UNPKG

gcp-nrces-fhir

Version:

Google cloud healthcare api NRCES FHIR implimenataion

55 lines 2.5 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImmunizationRecordBundle = void 0; const _1 = require("."); class ImmunizationRecordBundle extends _1.BundelMain { toHtml() { return __awaiter(this, void 0, void 0, function* () { throw new Error("Method not implemented."); }); } getFHIR(options) { return __awaiter(this, void 0, void 0, function* () { if (options.identifier) { let ret = { system: "http://www.nicehms.com", value: options.identifier.value, }; } options.composition.title = "Immunization Record Document"; const bundlemain = yield new _1.BundelMain(this.gcpCredetials, this.gcpPath).getentries(options.composition, options.pdfData); this.entry = bundlemain.entry; const sectionEntries = options.composition.section; yield this.getAllSectionAndAllEntries(0, sectionEntries); const body = { resourceType: "Bundle", id: options.id, meta: { lastUpdated: new Date().toISOString(), }, identifier: { system: "https://www.nicehms.com/bundle", value: options.id, }, type: "document", timestamp: options.composition.date, entry: this.entry, }; return body; }); } convertFhirToObject(options) { throw new Error("Method not implemented."); } } exports.ImmunizationRecordBundle = ImmunizationRecordBundle; //# sourceMappingURL=ImmunizationRecord.js.map