@metriport/shared 0.26.6 → 0.26.8-alpha.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,142 @@
1
+ import { z } from "zod";
2
+ import { BaseDomain } from "./base-domain";
3
+ export declare const COHORT_COLORS: readonly ["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"];
4
+ export declare const cohortColorsSchema: z.ZodEnum<["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"]>;
5
+ export declare const cohortSettingsSchema: z.ZodObject<{
6
+ adtMonitoring: z.ZodOptional<z.ZodBoolean>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ adtMonitoring?: boolean | undefined;
9
+ }, {
10
+ adtMonitoring?: boolean | undefined;
11
+ }>;
12
+ export declare const baseCohortSchema: z.ZodObject<{
13
+ name: z.ZodEffects<z.ZodString, string, string>;
14
+ color: z.ZodEnum<["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"]>;
15
+ description: z.ZodString;
16
+ settings: z.ZodObject<{
17
+ adtMonitoring: z.ZodOptional<z.ZodBoolean>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ adtMonitoring?: boolean | undefined;
20
+ }, {
21
+ adtMonitoring?: boolean | undefined;
22
+ }>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ color: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
26
+ description: string;
27
+ settings: {
28
+ adtMonitoring?: boolean | undefined;
29
+ };
30
+ }, {
31
+ name: string;
32
+ color: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
33
+ description: string;
34
+ settings: {
35
+ adtMonitoring?: boolean | undefined;
36
+ };
37
+ }>;
38
+ export type CohortColors = z.infer<typeof cohortColorsSchema>;
39
+ export type CohortSettings = z.infer<typeof cohortSettingsSchema>;
40
+ export type BaseCohort = z.infer<typeof baseCohortSchema>;
41
+ export declare const cohortCreateSchema: z.ZodObject<z.objectUtil.extendShape<{
42
+ name: z.ZodEffects<z.ZodString, string, string>;
43
+ color: z.ZodEnum<["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"]>;
44
+ description: z.ZodString;
45
+ settings: z.ZodObject<{
46
+ adtMonitoring: z.ZodOptional<z.ZodBoolean>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ adtMonitoring?: boolean | undefined;
49
+ }, {
50
+ adtMonitoring?: boolean | undefined;
51
+ }>;
52
+ }, {
53
+ description: z.ZodOptional<z.ZodString>;
54
+ settings: z.ZodOptional<z.ZodObject<{
55
+ adtMonitoring: z.ZodOptional<z.ZodBoolean>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ adtMonitoring?: boolean | undefined;
58
+ }, {
59
+ adtMonitoring?: boolean | undefined;
60
+ }>>;
61
+ }>, "strip", z.ZodTypeAny, {
62
+ name: string;
63
+ color: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
64
+ description?: string | undefined;
65
+ settings?: {
66
+ adtMonitoring?: boolean | undefined;
67
+ } | undefined;
68
+ }, {
69
+ name: string;
70
+ color: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white";
71
+ description?: string | undefined;
72
+ settings?: {
73
+ adtMonitoring?: boolean | undefined;
74
+ } | undefined;
75
+ }>;
76
+ export declare const cohortUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
77
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
78
+ color: z.ZodOptional<z.ZodEnum<["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"]>>;
79
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
80
+ settings: z.ZodOptional<z.ZodOptional<z.ZodObject<{
81
+ adtMonitoring: z.ZodOptional<z.ZodBoolean>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ adtMonitoring?: boolean | undefined;
84
+ }, {
85
+ adtMonitoring?: boolean | undefined;
86
+ }>>>;
87
+ }, {
88
+ eTag: z.ZodOptional<z.ZodString>;
89
+ }>, "strip", z.ZodTypeAny, {
90
+ name?: string | undefined;
91
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white" | undefined;
92
+ description?: string | undefined;
93
+ settings?: {
94
+ adtMonitoring?: boolean | undefined;
95
+ } | undefined;
96
+ eTag?: string | undefined;
97
+ }, {
98
+ name?: string | undefined;
99
+ color?: "red" | "green" | "blue" | "yellow" | "purple" | "orange" | "pink" | "brown" | "gray" | "black" | "white" | undefined;
100
+ description?: string | undefined;
101
+ settings?: {
102
+ adtMonitoring?: boolean | undefined;
103
+ } | undefined;
104
+ eTag?: string | undefined;
105
+ }>;
106
+ export type CohortCreateRequest = z.infer<typeof cohortCreateSchema>;
107
+ export type CohortUpdateRequest = z.infer<typeof cohortUpdateSchema>;
108
+ export type CohortCreateCmd = z.infer<typeof cohortCreateSchema> & {
109
+ cxId: string;
110
+ };
111
+ export type CohortUpdateCmd = z.infer<typeof cohortUpdateSchema> & {
112
+ id: string;
113
+ cxId: string;
114
+ };
115
+ export type Cohort = BaseCohort & BaseDomain & {
116
+ cxId: string;
117
+ };
118
+ export type BaseDTO = {
119
+ id: string;
120
+ eTag: string;
121
+ };
122
+ export declare function toBaseDTO(model: {
123
+ id: string;
124
+ eTag: string;
125
+ }): BaseDTO;
126
+ export type CohortDTO = {
127
+ id: string;
128
+ name: string;
129
+ description: string;
130
+ settings: CohortSettings;
131
+ };
132
+ export type CohortEntityWithSizeDTO = {
133
+ cohort: CohortDTO;
134
+ size: number;
135
+ };
136
+ export type CohortEntityWithPatientIdsAndSizeDTO = CohortEntityWithSizeDTO & {
137
+ patientIds: string[];
138
+ };
139
+ export declare function dtoFromCohort(cohort: Cohort & {
140
+ eTag: string;
141
+ }): CohortDT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AAM,CAAA;CAAE,CAAC;AAIhG,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAIhE,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAKtE;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,uBAAuB,GAAG;IAC3E,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAO1E"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dtoFromCohort = exports.toBaseDTO = exports.cohortUpdateSchema = exports.cohortCreateSchema = exports.baseCohortSchema = exports.cohortSettingsSchema = exports.cohortColorsSchema = exports.COHORT_COLORS = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.COHORT_COLORS = [
6
+ "red",
7
+ "green",
8
+ "blue",
9
+ "yellow",
10
+ "purple",
11
+ "orange",
12
+ "pink",
13
+ "brown",
14
+ "gray",
15
+ "black",
16
+ "white",
17
+ ];
18
+ // ### Domain Interface ###
19
+ exports.cohortColorsSchema = zod_1.z.enum(exports.COHORT_COLORS);
20
+ exports.cohortSettingsSchema = zod_1.z.object({
21
+ adtMonitoring: zod_1.z.boolean().optional(),
22
+ });
23
+ exports.baseCohortSchema = zod_1.z.object({
24
+ name: zod_1.z.string().transform(val => val.trim()),
25
+ color: exports.cohortColorsSchema,
26
+ description: zod_1.z.string(),
27
+ settings: exports.cohortSettingsSchema,
28
+ });
29
+ // #########################
30
+ // ### Input Interfaces ###
31
+ // > Request schemas for parsing request body
32
+ exports.cohortCreateSchema = exports.baseCohortSchema.extend({
33
+ description: zod_1.z.string().optional(),
34
+ settings: exports.cohortSettingsSchema.optional(),
35
+ });
36
+ exports.cohortUpdateSchema = exports.cohortCreateSchema.partial().extend({
37
+ eTag: zod_1.z.string().optional(),
38
+ });
39
+ function toBaseDTO(model) {
40
+ return {
41
+ id: model.id,
42
+ eTag: model.eTag,
43
+ };
44
+ }
45
+ exports.toBaseDTO = toBaseDTO;
46
+ function dtoFromCohort(cohort) {
47
+ return {
48
+ ...toBaseDTO(cohort),
49
+ name: cohort.name,
50
+ description: cohort.description,
51
+ settings: cohort.settings,
52
+ };
53
+ }
54
+ exports.dtoFromCohort = dtoFromCohort;
55
+ //# sourceMappingURL=cohort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cohort.js","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGX,QAAA,aAAa,GAAG;IAC3B,KAAK;IACL,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;CACC,CAAC;AAEX,2BAA2B;AACd,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAC;AAC3C,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AACU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAC7C,KAAK,EAAE,0BAAkB;IACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,4BAAoB;CAC/B,CAAC,CAAC;AAKH,4BAA4B;AAE5B,2BAA2B;AAC3B,6CAA6C;AAChC,QAAA,kBAAkB,GAAG,wBAAgB,CAAC,MAAM,CAAC;IACxD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,4BAAoB,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AACU,QAAA,kBAAkB,GAAG,0BAAkB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IACpE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAoBH,SAAgB,SAAS,CAAC,KAAmC;IAC3D,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC;AACJ,CAAC;AALD,8BAKC;AAkBD,SAAgB,aAAa,CAAC,MAAiC;IAC7D,OAAO;QACL,GAAG,SAAS,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC;AAPD,sCAOC"}
@@ -51,18 +51,18 @@ declare const queryMetaSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
51
51
  }>>;
52
52
  export type HttpMeta = z.infer<typeof queryMetaSchema>;
53
53
  export declare const paginationMetaSchema: z.ZodObject<{
54
- itemsInTotal: z.ZodNumber;
54
+ itemsInTotal: z.ZodOptional<z.ZodNumber>;
55
55
  itemsOnPage: z.ZodNumber;
56
56
  nextPage: z.ZodOptional<z.ZodString>;
57
57
  prevPage: z.ZodOptional<z.ZodString>;
58
58
  }, "strip", z.ZodTypeAny, {
59
- itemsInTotal: number;
60
59
  itemsOnPage: number;
60
+ itemsInTotal?: number | undefined;
61
61
  nextPage?: string | undefined;
62
62
  prevPage?: string | undefined;
63
63
  }, {
64
- itemsInTotal: number;
65
64
  itemsOnPage: number;
65
+ itemsInTotal?: number | undefined;
66
66
  nextPage?: string | undefined;
67
67
  prevPage?: string | undefined;
68
68
  }>;
@@ -28,7 +28,7 @@ function createQueryMetaSchema(maxItems = pagination_v2_1.maxItemsPerPage) {
28
28
  exports.createQueryMetaSchema = createQueryMetaSchema;
29
29
  const queryMetaSchema = createQueryMetaSchema();
30
30
  exports.paginationMetaSchema = zod_1.z.object({
31
- itemsInTotal: zod_1.z.number(),
31
+ itemsInTotal: zod_1.z.number().optional(),
32
32
  itemsOnPage: zod_1.z.number(),
33
33
  nextPage: zod_1.z.string().optional(),
34
34
  prevPage: zod_1.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/domain/pagination.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uCAAmD;AACnD,mDAAkD;AAElD,SAAgB,qBAAqB,CAAC,WAAmB,+BAAe;IACtE,OAAO,OAAC,CAAC,YAAY,CACnB,OAAC,CAAC,KAAK,CACL;QACE,OAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC/B,MAAM,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;YAC9B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC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AAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;YAC9B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B,CAAC;KACH,EACD,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,yDAAyD,EAAE,CAAC,EAAE,CAC7F,EACD,OAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,wBAAkB;aACtB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,EAAE;YAC3B,OAAO,EAAE,4CAA4C;SACtD,CAAC;aACD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,QAAQ,EAAE;YAClC,OAAO,EAAE,yCAAyC,QAAQ,EAAE;SAC7D,CAAC;aACD,QAAQ,EAAE;KACd,CAAC,CACH,CAAC;AACJ,CAAC;AA1BD,sDA0BC;AAED,MAAM,eAAe,GAAG,qBAAqB,EAAE,CAAC;AAGnC,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ import { BaseDomain } from "./base-domain";
3
+ export declare const patientCohortSchema: z.ZodObject<{
4
+ patientId: z.ZodString;
5
+ cohortId: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ patientId: string;
8
+ cohortId: string;
9
+ }, {
10
+ patientId: string;
11
+ cohortId: string;
12
+ }>;
13
+ export type BasePatientCohort = z.infer<typeof patientCohortSchema>;
14
+ export declare const patientCohortCreateSchema: z.ZodObject<{
15
+ patientId: z.ZodString;
16
+ cohortId: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ patientId: string;
19
+ cohortId: string;
20
+ }, {
21
+ patientId: string;
22
+ cohortId: string;
23
+ }>;
24
+ export declare const patientCohortUpdateSchema: z.ZodObject<{
25
+ patientId: z.ZodOptional<z.ZodString>;
26
+ cohortId: z.ZodOptional<z.ZodString>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ patientId?: string | undefined;
29
+ cohortId?: string | undefined;
30
+ }, {
31
+ patientId?: string | undefined;
32
+ cohortId?: string | undefined;
33
+ }>;
34
+ export type PatientCohortUpdateCmd = z.infer<typeof patientCohortUpdateSchema>;
35
+ export type PatientCohortCreateCmd = z.infer<typeof patientCohortCreateSchema>;
36
+ export type PatientCohort = BasePatientCohort & BaseDomain & {
37
+ cxId: string;
38
+ };
39
+ //# sourceMappingURL=patient-cohort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient-cohort.d.ts","sourceRoot":"","sources":["../../src/domain/patient-cohort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;EAAsB,CAAC;AAC7D,eAAO,MAAM,yBAAyB;;;;;;;;;EAAsC,CAAC;AAG7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC/E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG/E,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.patientCohortUpdateSchema = exports.patientCohortCreateSchema = exports.patientCohortSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ // PatientCohort Base Interface
6
+ exports.patientCohortSchema = zod_1.z.object({
7
+ patientId: zod_1.z.string(),
8
+ cohortId: zod_1.z.string(),
9
+ });
10
+ exports.patientCohortCreateSchema = exports.patientCohortSchema;
11
+ exports.patientCohortUpdateSchema = exports.patientCohortCreateSchema.partial();
12
+ //# sourceMappingURL=patient-cohort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient-cohort.js","sourceRoot":"","sources":["../../src/domain/patient-cohort.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGxB,+BAA+B;AAClB,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAGU,QAAA,yBAAyB,GAAG,2BAAmB,CAAC;AAChD,QAAA,yBAAyB,GAAG,iCAAyB,CAAC,OAAO,EAAE,CAAC"}
@@ -23,6 +23,13 @@ export declare const CPT_URL = "http://www.ama-assn.org/go/cpt";
23
23
  export declare const CPT_OID = "2.16.840.1.113883.6.12";
24
24
  export declare const NDDF_URL = "http://terminology.hl7.org/CodeSystem/nddf";
25
25
  export declare const HL7_ACT_URL = "http://terminology.hl7.org/CodeSystem/v3-ActCode";
26
+ export declare const CONDITION_CLINICAL_STATUS_URL = "http://terminology.hl7.org/CodeSystem/condition-clinical";
27
+ export declare const CONDITION_VERIFICATION_STATUS_URL = "http://terminology.hl7.org/CodeSystem/condition-ver-status";
28
+ export declare const PRACTITIONER_UPIN_URL = "http://hl7.org/fhir/sid/us-upin";
29
+ export declare const PRACTITIONER_NPI_URL = "http://hl7.org/fhir/sid/us-npi";
30
+ export declare const PRACTITIONER_ROLE_URL = "http://terminology.hl7.org/CodeSystem/practitioner-role";
31
+ export declare const OBSERVATION_CATEGORY_URL = "http://terminology.hl7.org/CodeSystem/observation-category";
32
+ export declare const DIAGNOSTIC_SERVICE_SECTIONS_URL = "http://terminology.hl7.org/CodeSystem/v2-0074";
26
33
  export declare const EPIC_PARTIAL_URN = "1.2.840.114350.1.13";
27
34
  export declare const HL7_PARTIAL_URN = "2.16.840.1.113883";
28
35
  export declare const knownSystemUrls: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/medical/fhir/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,UAAU,2BAA2B,CAAC;AACnD,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,eAAO,MAAM,UAAU,UAAU,CAAC;AAClC,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAC5C,eAAO,MAAM,SAAS,0BAA0B,CAAC;AAEjD,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,UAAU,sCAAsC,CAAC;AAC9D,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,eAAO,MAAM,UAAU,UAAU,CAAC;AAClC,eAAO,MAAM,SAAS,kEAAkE,CAAC;AAEzF,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,UAAU,gDAAgD,CAAC;AACxE,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,OAAO,gCAAgC,CAAC;AACrD,eAAO,MAAM,OAAO,2BAA2B,CAAC;AAEhD,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAC9B,eAAO,MAAM,OAAO,gCAAgC,CAAC;AACrD,eAAO,MAAM,OAAO,6BAA6B,CAAC;AAElD,eAAO,MAAM,QAAQ,QAAQ,CAAC;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AA2B,CAAC;AAEhD,eAAO,MAAM,QAAQ,+CAA+C,CAAC;AAErE,eAAO,MAAM,WAAW,qDAAqD,CAAC;AAE9E,eAAO,MAAM,6BAA6B,6DACkB,CAAC;AAC7D,eAAO,MAAM,iCAAiC,+DACgB,CAAC;AAE/D,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AACvE,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AACrE,eAAO,MAAM,qBAAqB,4DAA4D,CAAC;AAE/F,eAAO,MAAM,wBAAwB,+DACyB,CAAC;AAG/D,eAAO,MAAM,+BAA+B,kDAAkD,CAAC;AAE/F,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAEnD,eAAO,MAAM,eAAe,UAU3B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.knownSystemUrls = exports.HL7_PARTIAL_URN = exports.EPIC_PARTIAL_URN = exports.HL7_ACT_URL = exports.NDDF_URL = exports.CPT_OID = exports.CPT_URL = exports.CPT_CODE = exports.CVX_OID = exports.CVX_URL = exports.CVX_CODE = exports.NDC_OID = exports.NDC_URL = exports.NDC_CODE = exports.RXNORM_OID = exports.RXNORM_URL = exports.RXNORM_CODE = exports.ICD_9_URL = exports.ICD_9_CODE = exports.ICD_10_OID = exports.ICD_10_URL = exports.ICD_10_CODE = exports.LOINC_OID = exports.LOINC_URL = exports.LOINC_CODE = exports.SNOMED_OID = exports.SNOMED_URL = exports.SNOMED_CODE = void 0;
3
+ exports.knownSystemUrls = exports.HL7_PARTIAL_URN = exports.EPIC_PARTIAL_URN = exports.DIAGNOSTIC_SERVICE_SECTIONS_URL = exports.OBSERVATION_CATEGORY_URL = exports.PRACTITIONER_ROLE_URL = exports.PRACTITIONER_NPI_URL = exports.PRACTITIONER_UPIN_URL = exports.CONDITION_VERIFICATION_STATUS_URL = exports.CONDITION_CLINICAL_STATUS_URL = exports.HL7_ACT_URL = exports.NDDF_URL = exports.CPT_OID = exports.CPT_URL = exports.CPT_CODE = exports.CVX_OID = exports.CVX_URL = exports.CVX_CODE = exports.NDC_OID = exports.NDC_URL = exports.NDC_CODE = exports.RXNORM_OID = exports.RXNORM_URL = exports.RXNORM_CODE = exports.ICD_9_URL = exports.ICD_9_CODE = exports.ICD_10_OID = exports.ICD_10_URL = exports.ICD_10_CODE = exports.LOINC_OID = exports.LOINC_URL = exports.LOINC_CODE = exports.SNOMED_OID = exports.SNOMED_URL = exports.SNOMED_CODE = void 0;
4
4
  exports.SNOMED_CODE = "snomed";
5
5
  exports.SNOMED_URL = "http://snomed.info/sct";
6
6
  exports.SNOMED_OID = "2.16.840.1.113883.6.96";
@@ -26,6 +26,14 @@ exports.CPT_URL = "http://www.ama-assn.org/go/cpt";
26
26
  exports.CPT_OID = "2.16.840.1.113883.6.12";
27
27
  exports.NDDF_URL = "http://terminology.hl7.org/CodeSystem/nddf";
28
28
  exports.HL7_ACT_URL = "http://terminology.hl7.org/CodeSystem/v3-ActCode";
29
+ exports.CONDITION_CLINICAL_STATUS_URL = "http://terminology.hl7.org/CodeSystem/condition-clinical";
30
+ exports.CONDITION_VERIFICATION_STATUS_URL = "http://terminology.hl7.org/CodeSystem/condition-ver-status";
31
+ exports.PRACTITIONER_UPIN_URL = "http://hl7.org/fhir/sid/us-upin";
32
+ exports.PRACTITIONER_NPI_URL = "http://hl7.org/fhir/sid/us-npi";
33
+ exports.PRACTITIONER_ROLE_URL = "http://terminology.hl7.org/CodeSystem/practitioner-role";
34
+ exports.OBSERVATION_CATEGORY_URL = "http://terminology.hl7.org/CodeSystem/observation-category";
35
+ // https://build.fhir.org/valueset-diagnostic-service-sections.html
36
+ exports.DIAGNOSTIC_SERVICE_SECTIONS_URL = "http://terminology.hl7.org/CodeSystem/v2-0074";
29
37
  exports.EPIC_PARTIAL_URN = "1.2.840.114350.1.13";
30
38
  exports.HL7_PARTIAL_URN = "2.16.840.1.113883";
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CAAC;AAC1D,QAAA,oBAAoB,GAAG,gCAAgC,CAAC;AACxD,QAAA,qBAAqB,GAAG,yDAAyD,CAAC;AAElF,QAAA,wBAAwB,GACnC,4DAA4D,CAAC;AAE/D,mEAAmE;AACtD,QAAA,+BAA+B,GAAG,+CAA+C,CAAC;AAElF,QAAA,gBAAgB,GAAG,qBAAqB,CAAC;AACzC,QAAA,eAAe,GAAG,mBAAmB,CAAC;AAEtC,QAAA,eAAe,GAAG;IAC7B,kBAAU;IACV,eAAO;IACP,eAAO;IACP,eAAO;IACP,kBAAU;IACV,iBAAS;IACT,iBAAS;IACT,kBAAU;IACV,mBAAW;CACZ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/shared",
3
- "version": "0.26.6",
3
+ "version": "0.26.8-alpha.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/",
@@ -116,5 +116,5 @@
116
116
  "ts-jest": "29.1.1",
117
117
  "typescript": "^4.9.5"
118
118
  },
119
- "gitHead": "54f58bc510b808fc8bfd805d2652cac52f4b3e1f"
119
+ "gitHead": "a713c6041729f1a6bfbd89c0905df6c335cd973d"
120
120
  }