gcp-nrces-fhir
Version:
Google cloud healthcare api NRCES FHIR implimenataion
148 lines • 5.54 kB
TypeScript
import { ATTACHMENT, CODEABLE_CONCEPT, EXTENSION, IDENTTIFIER, MULTI_RESOURCE } from "../config";
import { ResourceMaster } from "../Interfaces";
import ResourceMain from "../resources/ResourceMai";
import { TO_HTML_HCX_OPTIONS } from "./interfaces";
interface subject extends MULTI_RESOURCE {
resource: "Patient" | "Group";
}
interface Recipient extends MULTI_RESOURCE {
resource: "Device" | "RelatedPerson" | "Group" | "CareTeam" | "HealthcareService" | "Organization" | "Patient" | "Practitioner" | "PractitionerRole";
}
interface Sender extends MULTI_RESOURCE {
resource: "Device" | "Organization" | "Patient" | "Practitioner" | "PractitionerRole" | "RelatedPerson" | "HealthcareService" | "Practitioner" | "PractitionerRole" | "Organization" | "Patient";
}
interface ReasonReference extends MULTI_RESOURCE {
resource: "DiagnosticReport" | "Condition" | "Observation" | "DocumentReference";
}
interface Encounter extends MULTI_RESOURCE {
resource: "Encounter";
}
interface InResponseTo extends MULTI_RESOURCE {
resource: "Communication";
}
declare const statusArray: readonly ["preparation", "in-progress", "not-done", "on-hold", "stopped", "completed", "entered-in-error", "unknown"];
declare type Status = (typeof statusArray)[number];
export interface PAYLOAD {
id?: string;
extension?: EXTENSION[];
modifierExtension?: EXTENSION[];
content?: {
contentAttachment?: ATTACHMENT;
contentString?: string;
contentReference?: MULTI_RESOURCE;
};
}
export interface COMMUNICATION {
id?: string;
hcx?: "nhcx" | "swasth";
resourceType: "Communication";
text: string;
implicitRulesLink?: string;
subject?: subject;
inResponseTo?: InResponseTo[];
encounter?: Encounter;
topic?: CODEABLE_CONCEPT;
sentDate?: string;
receivedDate?: string;
identifier?: IDENTTIFIER[];
basedOn?: MULTI_RESOURCE[];
partOf?: MULTI_RESOURCE[];
status: Status;
about?: MULTI_RESOURCE[];
medium?: CODEABLE_CONCEPT[];
category: CODEABLE_CONCEPT[];
priority: "routine" | "urgent" | "asap" | "stat";
recipient?: Recipient[];
reasonCode?: CODEABLE_CONCEPT[];
reasonReference?: ReasonReference[];
sender?: Sender;
payload?: PAYLOAD[];
}
interface TO_HTML_HCX_OPTIONS_COMMUNICATION extends Omit<TO_HTML_HCX_OPTIONS, "body"> {
body: COMMUNICATION;
}
export declare class Communication extends ResourceMain implements ResourceMaster {
toHtml(options: TO_HTML_HCX_OPTIONS_COMMUNICATION): Promise<string>;
getFHIR(options: COMMUNICATION): {
resourceType: string;
identifier: IDENTTIFIER[] | undefined;
topic: CODEABLE_CONCEPT | undefined;
id: string | undefined;
implicitRules: string | undefined;
medium: CODEABLE_CONCEPT[] | undefined;
subject: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
} | undefined;
meta: {
versionId: string;
lastUpdated: string;
profile: string[];
};
text: {
status: string;
div: string;
};
basedOn: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
about: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
partOf: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
status: "in-progress" | "entered-in-error" | "unknown" | "completed" | "on-hold" | "stopped" | "preparation" | "not-done";
category: CODEABLE_CONCEPT[];
priority: "stat" | "routine" | "urgent" | "asap";
recipient: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
sender: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
} | undefined;
payload: any[] | undefined;
received: string | undefined;
sent: string | undefined;
reasonCode: CODEABLE_CONCEPT[] | undefined;
reasonReference: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
encounter: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
} | undefined;
inResponseTo: {
reference: string;
type: string | undefined;
identifier: IDENTTIFIER | undefined;
display: string | undefined;
}[] | undefined;
};
convertFhirToObject(options: any): COMMUNICATION;
statusArray(): Status[];
}
export {};
//# sourceMappingURL=Communication.d.ts.map