@metriport/shared 0.15.1-alpha.2 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ export type CqDirectorySimplifiedOrg = {
2
+ id: string;
3
+ name: string;
4
+ urlXCPD: string;
5
+ urlDQ: string;
6
+ urlDR: string;
7
+ rootOrganization?: string | undefined;
8
+ managingOrganizationId?: string | undefined;
9
+ };
10
+ //# sourceMappingURL=simplified-org.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplified-org.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/carequality/directory/simplified-org.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=simplified-org.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplified-org.js","sourceRoot":"","sources":["../../../../../src/interface/external/carequality/directory/simplified-org.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/shared",
3
- "version": "0.15.1-alpha.2",
3
+ "version": "0.17.0",
4
4
  "description": "Common code shared across packages - by Metriport Inc.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -92,5 +92,6 @@
92
92
  "ts-essentials": "^9.3.1",
93
93
  "ts-jest": "29.1.1",
94
94
  "typescript": "^4.9.5"
95
- }
95
+ },
96
+ "gitHead": "209fd9ebe5c2ab348cfa7e448f1c5cb5f5136a92"
96
97
  }
@@ -1,4 +0,0 @@
1
- import { Observation } from "@medplum/fhirtypes";
2
- export declare const observationDisplayComparator: (a: Observation, b: Observation) => number;
3
- export declare const sortObservationsForDisplay: (observations: Observation[]) => Observation[];
4
- //# sourceMappingURL=observation-ordering.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observation-ordering.d.ts","sourceRoot":"","sources":["../../../src/medical/fhir/observation-ordering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAsCjD,eAAO,MAAM,4BAA4B,MAAO,WAAW,KAAK,WAAW,KAAG,MAO7E,CAAC;AAEF,eAAO,MAAM,0BAA0B,iBAAkB,WAAW,EAAE,KAAG,WAAW,EAEnF,CAAC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sortObservationsForDisplay = exports.observationDisplayComparator = void 0;
4
- // Not sure the names of the codes are correct,
5
- // but they're related and should be grouped together regardless
6
- const OXYGEN_SATURATION_LOINC = {
7
- SpO2: "2708-6",
8
- Sp02ByPulseOximetry: "59408-5",
9
- Sp02ByDirectSampling: "20509-6",
10
- Sp02InCapillaryBloodByPulseOximetry: "59466-1",
11
- Sp02OnRoomAir: "59410-1",
12
- };
13
- const VITALS_LOINC = {
14
- HeartRate: "8867-4",
15
- BloodPressureSystolic: "8480-6",
16
- BloodPressureDiastolic: "8462-4",
17
- RespiratoryRate: "9279-1",
18
- InhaledOxygenFlowRate: "3151-8",
19
- Temperature: "8310-5",
20
- ...OXYGEN_SATURATION_LOINC,
21
- Weight: "29463-7",
22
- Height: "8302-2",
23
- BMI: "39156-5",
24
- };
25
- // Create display order based on the order of values in VITALS_LOINC
26
- const VITALS_DISPLAY_ORDER = Object.values(VITALS_LOINC).reduce((acc, code, index) => ({
27
- ...acc,
28
- [code]: index,
29
- }), {});
30
- // Stable sort that puts VITALS_LOINC codes first, then defaults to the upstream order.
31
- const observationDisplayComparator = (a, b) => {
32
- const aCode = a.code?.coding?.[0]?.code;
33
- const bCode = b.code?.coding?.[0]?.code;
34
- const orderA = aCode ? VITALS_DISPLAY_ORDER[aCode] : Number.MAX_SAFE_INTEGER;
35
- const orderB = bCode ? VITALS_DISPLAY_ORDER[bCode] : Number.MAX_SAFE_INTEGER;
36
- return orderA - orderB;
37
- };
38
- exports.observationDisplayComparator = observationDisplayComparator;
39
- const sortObservationsForDisplay = (observations) => {
40
- return [...observations].sort(exports.observationDisplayComparator);
41
- };
42
- exports.sortObservationsForDisplay = sortObservationsForDisplay;
43
- //# sourceMappingURL=observation-ordering.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observation-ordering.js","sourceRoot":"","sources":["../../../src/medical/fhir/observation-ordering.ts"],"names":[],"mappings":";;;AAEA,+CAA+C;AAC/C,gEAAgE;AAChE,MAAM,uBAAuB,GAAG;IAC9B,IAAI,EAAE,QAAQ;IACd,mBAAmB,EAAE,SAAS;IAC9B,oBAAoB,EAAE,SAAS;IAC/B,mCAAmC,EAAE,SAAS;IAC9C,aAAa,EAAE,SAAS;CAChB,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE,QAAQ;IACnB,qBAAqB,EAAE,QAAQ;IAC/B,sBAAsB,EAAE,QAAQ;IAChC,eAAe,EAAE,QAAQ;IACzB,qBAAqB,EAAE,QAAQ;IAC/B,WAAW,EAAE,QAAQ;IACrB,GAAG,uBAAuB;IAC1B,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,SAAS;CACN,CAAC;AAKX,oEAAoE;AACpE,MAAM,oBAAoB,GAAgC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAC1F,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACrB,GAAG,GAAG;IACN,CAAC,IAAI,C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