gcp-nrces-fhir
Version:
Google cloud healthcare api NRCES FHIR implimenataion
75 lines • 2.98 kB
TypeScript
import { resourceType } from "..";
import ResourceToHTML from "../classess/ReseorcetToHtml";
import { CodeDisplay, IDENTTIFIER, MULTI_RESOURCE } from "../config";
export interface DOSAGE_INSTRUCTION {
text: string;
additionalInstruction?: CodeDisplay[];
timing: string;
route: CodeDisplay[];
method: CodeDisplay[];
}
export default class ResourceMain extends ResourceToHTML {
/**
* this return the tex div by subcratig first 42 charceters and last 6 s=charecters
* @param divtext
* @returns
*/
protected getDivText: (divtext: string) => string;
/**
* this retuen the id of the reference in a resource
* @param options
* @returns
*/
getIdFromReference: (options: {
ref: string;
resourceType: resourceType;
}) => string;
/**
* This returns the identifers from identeries by flters the systems
* @param system
* @param identifiers
* @returns
*/
getIdentifers: (system: string, options: any) => any;
/**
* This is when more than one type resource is under reference
* @param multiResource
* @returns
*/
getFromMultResource: (multiResource: {
reference: string;
display?: string;
identifier?: IDENTTIFIER;
type?: string;
}) => MULTI_RESOURCE;
/**
* this will return copy of resource modified
* @param resource
*/
bundlify(resource: any): any;
removeUndefinedKeys<T>(obj: T): T;
createDosageInstrction(options: DOSAGE_INSTRUCTION): any;
convertDosageInstructionToObject(option: any): DOSAGE_INSTRUCTION;
getFhirvalueCimplexHandle(value: any, curInput: any): any;
getConverOBjValueComplexHandle(el: any, value: any): void;
/**
* Converts the `reference` property of a FHIR resource to a full URL using the specified base URL.
*
* @param reference - A FHIR resource object that may contain a `reference` property.
* @param url - The base URL to prepend to the `reference` property. Defaults to "https://www.nicehms.com/query=".
* @returns The updated FHIR resource object with its `reference` property transformed into a full URL.
*
* @example
* const resource = { reference: "Patient/123" };
* const updatedResource = convertReferenceToUrl(resource, "https://example.com/");
* console.log(updatedResource);
* // Output: { reference: "https://example.com/Patient/123" }
*
* @remarks
* - This function modifies the input `reference` object in-place.
* - If the `reference` property is not present, the function returns the resource unchanged.
* - Ensure the `url` parameter ends with a slash or appropriate delimiter for the resulting URL to be valid.
*/
convertReferenceToUrl: (reference: MULTI_RESOURCE, url?: string) => MULTI_RESOURCE;
}
//# sourceMappingURL=ResourceMai.d.ts.map