@metriport/shared 0.29.0 → 0.30.0-alpha.1
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.
- package/dist/common/sql.d.ts +17 -0
- package/dist/common/sql.d.ts.map +1 -0
- package/dist/common/sql.js +3 -0
- package/dist/common/sql.js.map +1 -0
- package/dist/domain/cohort.d.ts +4 -4
- package/dist/domain/cohort.d.ts.map +1 -1
- package/dist/domain/cohort.js +7 -3
- package/dist/domain/cohort.js.map +1 -1
- package/dist/domain/contact/__tests__/phone.test.js +4 -0
- package/dist/domain/contact/__tests__/phone.test.js.map +1 -1
- package/dist/domain/cql-engine/transform.d.ts +2 -2
- package/dist/domain/db.d.ts +8 -0
- package/dist/domain/db.d.ts.map +1 -1
- package/dist/domain/db.js +1 -0
- package/dist/domain/db.js.map +1 -1
- package/dist/domain/network-query/__tests__/source.test.d.ts +2 -0
- package/dist/domain/network-query/__tests__/source.test.d.ts.map +1 -0
- package/dist/domain/network-query/__tests__/source.test.js +450 -0
- package/dist/domain/network-query/__tests__/source.test.js.map +1 -0
- package/dist/domain/network-query/index.d.ts +3 -0
- package/dist/domain/network-query/index.d.ts.map +1 -0
- package/dist/domain/network-query/index.js +19 -0
- package/dist/domain/network-query/index.js.map +1 -0
- package/dist/domain/network-query/query.d.ts +18 -3
- package/dist/domain/network-query/query.d.ts.map +1 -1
- package/dist/domain/network-query/source.d.ts +309 -19
- package/dist/domain/network-query/source.d.ts.map +1 -1
- package/dist/domain/network-query/source.js +257 -4
- package/dist/domain/network-query/source.js.map +1 -1
- package/dist/domain/organization.d.ts +3 -3
- package/dist/domain/organization.js +1 -1
- package/dist/domain/organization.js.map +1 -1
- package/dist/domain/patient/patient-monitoring/discharge-requery.d.ts +132 -0
- package/dist/domain/patient/patient-monitoring/discharge-requery.d.ts.map +1 -1
- package/dist/domain/patient/patient-monitoring/discharge-requery.js +10 -1
- package/dist/domain/patient/patient-monitoring/discharge-requery.js.map +1 -1
- package/dist/domain/patient/patient-monitoring/utils.d.ts +31 -0
- package/dist/domain/patient/patient-monitoring/utils.d.ts.map +1 -1
- package/dist/domain/patient/patient-monitoring/utils.js +68 -7
- package/dist/domain/patient/patient-monitoring/utils.js.map +1 -1
- package/dist/domain/roster/patient-roster.d.ts +5 -1
- package/dist/domain/roster/patient-roster.d.ts.map +1 -1
- package/dist/domain/tcm-encounter.d.ts +5 -2
- package/dist/domain/tcm-encounter.d.ts.map +1 -1
- package/dist/domain/tcm-encounter.js +1 -0
- package/dist/domain/tcm-encounter.js.map +1 -1
- package/dist/error/shared.js +1 -1
- package/dist/error/shared.js.map +1 -1
- package/dist/external/ehr/practicefusion/allergy-data-map.d.ts +34 -0
- package/dist/external/ehr/practicefusion/allergy-data-map.d.ts.map +1 -0
- package/dist/external/ehr/practicefusion/allergy-data-map.js +2612 -0
- package/dist/external/ehr/practicefusion/allergy-data-map.js.map +1 -0
- package/dist/external/ehr/practicefusion/index.d.ts +3 -0
- package/dist/external/ehr/practicefusion/index.d.ts.map +1 -0
- package/dist/external/ehr/practicefusion/index.js +19 -0
- package/dist/external/ehr/practicefusion/index.js.map +1 -0
- package/dist/external/ehr/practicefusion/shared.d.ts +18 -0
- package/dist/external/ehr/practicefusion/shared.d.ts.map +1 -0
- package/dist/external/ehr/practicefusion/shared.js +66 -0
- package/dist/external/ehr/practicefusion/shared.js.map +1 -0
- package/dist/external/ihe/constants.d.ts +11 -0
- package/dist/external/ihe/constants.d.ts.map +1 -1
- package/dist/external/ihe/constants.js +65 -1
- package/dist/external/ihe/constants.js.map +1 -1
- package/dist/external/ihe/index.d.ts +3 -0
- package/dist/external/ihe/index.d.ts.map +1 -0
- package/dist/external/ihe/index.js +19 -0
- package/dist/external/ihe/index.js.map +1 -0
- package/dist/external/ihe/shared.d.ts +8 -0
- package/dist/external/ihe/shared.d.ts.map +1 -0
- package/dist/external/ihe/shared.js +25 -0
- package/dist/external/ihe/shared.js.map +1 -0
- package/dist/external/index.d.ts +1 -0
- package/dist/external/index.d.ts.map +1 -1
- package/dist/external/index.js +1 -0
- package/dist/external/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +5 -1
- package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/athenahealth/cx-mapping.js +2 -1
- package/dist/interface/external/ehr/athenahealth/cx-mapping.js.map +1 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +6 -2
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.js +2 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
- package/dist/interface/external/ehr/eclinicalworks/cx-mapping.d.ts +465 -0
- package/dist/interface/external/ehr/eclinicalworks/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/ehr/eclinicalworks/cx-mapping.js +10 -0
- package/dist/interface/external/ehr/eclinicalworks/cx-mapping.js.map +1 -0
- package/dist/interface/external/ehr/elation/cx-mapping.d.ts +5 -1
- package/dist/interface/external/ehr/elation/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/elation/cx-mapping.js +2 -1
- package/dist/interface/external/ehr/elation/cx-mapping.js.map +1 -1
- package/dist/interface/external/ehr/embed/jwt-token.d.ts +2 -2
- package/dist/interface/external/ehr/healthie/cx-mapping.d.ts +5 -1
- package/dist/interface/external/ehr/healthie/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/healthie/cx-mapping.js +2 -1
- package/dist/interface/external/ehr/healthie/cx-mapping.js.map +1 -1
- package/dist/interface/external/ehr/healthie/medication.d.ts +8 -8
- package/dist/interface/external/ehr/practicefusion/allergy.d.ts +16 -0
- package/dist/interface/external/ehr/practicefusion/allergy.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/allergy.js +39 -0
- package/dist/interface/external/ehr/practicefusion/allergy.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/appointment.d.ts +137 -0
- package/dist/interface/external/ehr/practicefusion/appointment.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/appointment.js +29 -0
- package/dist/interface/external/ehr/practicefusion/appointment.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/condition.d.ts +17 -0
- package/dist/interface/external/ehr/practicefusion/condition.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/condition.js +13 -0
- package/dist/interface/external/ehr/practicefusion/condition.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/cx-mapping.d.ts +472 -0
- package/dist/interface/external/ehr/practicefusion/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/cx-mapping.js +13 -0
- package/dist/interface/external/ehr/practicefusion/cx-mapping.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/fhir-resources.d.ts +8 -0
- package/dist/interface/external/ehr/practicefusion/fhir-resources.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/fhir-resources.js +3 -0
- package/dist/interface/external/ehr/practicefusion/fhir-resources.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/index.d.ts +2 -0
- package/dist/interface/external/ehr/practicefusion/index.d.ts.map +1 -1
- package/dist/interface/external/ehr/practicefusion/index.js +2 -0
- package/dist/interface/external/ehr/practicefusion/index.js.map +1 -1
- package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts +15 -3
- package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts.map +1 -1
- package/dist/interface/external/ehr/practicefusion/jwt-token.js +8 -2
- package/dist/interface/external/ehr/practicefusion/jwt-token.js.map +1 -1
- package/dist/interface/external/ehr/practicefusion/medication.d.ts +17 -0
- package/dist/interface/external/ehr/practicefusion/medication.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/medication.js +13 -0
- package/dist/interface/external/ehr/practicefusion/medication.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/refresh-token.d.ts +19 -0
- package/dist/interface/external/ehr/practicefusion/refresh-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/refresh-token.js +11 -0
- package/dist/interface/external/ehr/practicefusion/refresh-token.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/write-back.d.ts +47 -0
- package/dist/interface/external/ehr/practicefusion/write-back.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/write-back.js +29 -0
- package/dist/interface/external/ehr/practicefusion/write-back.js.map +1 -0
- package/dist/interface/external/ehr/salesforce/cx-mapping.d.ts +465 -0
- package/dist/interface/external/ehr/salesforce/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/ehr/salesforce/cx-mapping.js +10 -0
- package/dist/interface/external/ehr/salesforce/cx-mapping.js.map +1 -0
- package/dist/interface/external/ehr/shared.d.ts +8 -0
- package/dist/interface/external/ehr/shared.d.ts.map +1 -1
- package/dist/interface/external/ehr/shared.js +4 -1
- package/dist/interface/external/ehr/shared.js.map +1 -1
- package/dist/interface/external/ehr/source.d.ts +2 -0
- package/dist/interface/external/ehr/source.d.ts.map +1 -1
- package/dist/interface/external/ehr/source.js +6 -1
- package/dist/interface/external/ehr/source.js.map +1 -1
- package/dist/interface/external/index.d.ts +1 -0
- package/dist/interface/external/index.d.ts.map +1 -1
- package/dist/interface/external/index.js +1 -0
- package/dist/interface/external/index.js.map +1 -1
- package/dist/interface/external/surescripts/index.d.ts +2 -0
- package/dist/interface/external/surescripts/index.d.ts.map +1 -1
- package/dist/interface/external/surescripts/index.js +2 -0
- package/dist/interface/external/surescripts/index.js.map +1 -1
- package/dist/interface/internal/cohort.d.ts +1000 -0
- package/dist/interface/internal/cohort.d.ts.map +1 -0
- package/dist/interface/internal/cohort.js +62 -0
- package/dist/interface/internal/cohort.js.map +1 -0
- package/dist/interface/internal/document-query.d.ts +31 -0
- package/dist/interface/internal/document-query.d.ts.map +1 -0
- package/dist/interface/internal/document-query.js +21 -0
- package/dist/interface/internal/document-query.js.map +1 -0
- package/dist/interface/internal/index.d.ts +2 -0
- package/dist/interface/internal/index.d.ts.map +1 -1
- package/dist/interface/internal/index.js +2 -0
- package/dist/interface/internal/index.js.map +1 -1
- package/dist/medical/fhir/constants.d.ts +1 -0
- package/dist/medical/fhir/constants.d.ts.map +1 -1
- package/dist/medical/fhir/constants.js +2 -1
- package/dist/medical/fhir/constants.js.map +1 -1
- package/dist/medical/webhook/webhook-request.d.ts +683 -2
- package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
- package/dist/medical/webhook/webhook-request.js +57 -2
- package/dist/medical/webhook/webhook-request.js.map +1 -1
- package/dist/net/axios.d.ts +3 -0
- package/dist/net/axios.d.ts.map +1 -0
- package/dist/net/axios.js +21 -0
- package/dist/net/axios.js.map +1 -0
- package/dist/net/http.d.ts +25 -0
- package/dist/net/http.d.ts.map +1 -0
- package/dist/net/http.js +76 -0
- package/dist/net/http.js.map +1 -0
- package/dist/net/index.d.ts +6 -0
- package/dist/net/index.d.ts.map +1 -0
- package/dist/net/index.js +22 -0
- package/dist/net/index.js.map +1 -0
- package/dist/net/retry.d.ts +1 -0
- package/dist/net/retry.d.ts.map +1 -1
- package/dist/net/retry.js +8 -1
- package/dist/net/retry.js.map +1 -1
- package/dist/util/duration.d.ts +1 -0
- package/dist/util/duration.d.ts.map +1 -1
- package/dist/util/duration.js +15 -1
- package/dist/util/duration.js.map +1 -1
- package/dist/util/zod.d.ts +2 -0
- package/dist/util/zod.d.ts.map +1 -1
- package/dist/util/zod.js +10 -1
- package/dist/util/zod.js.map +1 -1
- package/package.json +6 -2
|
@@ -15,23 +15,23 @@ export declare const medicationSchema: z.ZodObject<{
|
|
|
15
15
|
name: string | null;
|
|
16
16
|
id: string;
|
|
17
17
|
active: boolean | null;
|
|
18
|
+
frequency: string | null;
|
|
18
19
|
comment: string | null;
|
|
19
20
|
end_date: string | null;
|
|
20
21
|
start_date: string | null;
|
|
21
22
|
directions: string | null;
|
|
22
23
|
dosage: string | null;
|
|
23
|
-
frequency: string | null;
|
|
24
24
|
}, {
|
|
25
25
|
code: string | null;
|
|
26
26
|
name: string | null;
|
|
27
27
|
id: string;
|
|
28
28
|
active: boolean | null;
|
|
29
|
+
frequency: string | null;
|
|
29
30
|
comment: string | null;
|
|
30
31
|
end_date: string | null;
|
|
31
32
|
start_date: string | null;
|
|
32
33
|
directions: string | null;
|
|
33
34
|
dosage: string | null;
|
|
34
|
-
frequency: string | null;
|
|
35
35
|
}>;
|
|
36
36
|
export type Medication = z.infer<typeof medicationSchema>;
|
|
37
37
|
export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
@@ -52,23 +52,23 @@ export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
|
52
52
|
name: string | null;
|
|
53
53
|
id: string;
|
|
54
54
|
active: boolean | null;
|
|
55
|
+
frequency: string | null;
|
|
55
56
|
comment: string | null;
|
|
56
57
|
end_date: string | null;
|
|
57
58
|
start_date: string | null;
|
|
58
59
|
directions: string | null;
|
|
59
60
|
dosage: string | null;
|
|
60
|
-
frequency: string | null;
|
|
61
61
|
}, {
|
|
62
62
|
code: string | null;
|
|
63
63
|
name: string | null;
|
|
64
64
|
id: string;
|
|
65
65
|
active: boolean | null;
|
|
66
|
+
frequency: string | null;
|
|
66
67
|
comment: string | null;
|
|
67
68
|
end_date: string | null;
|
|
68
69
|
start_date: string | null;
|
|
69
70
|
directions: string | null;
|
|
70
71
|
dosage: string | null;
|
|
71
|
-
frequency: string | null;
|
|
72
72
|
}>, "many">;
|
|
73
73
|
}, "strip", z.ZodTypeAny, {
|
|
74
74
|
medications: {
|
|
@@ -76,12 +76,12 @@ export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
|
76
76
|
name: string | null;
|
|
77
77
|
id: string;
|
|
78
78
|
active: boolean | null;
|
|
79
|
+
frequency: string | null;
|
|
79
80
|
comment: string | null;
|
|
80
81
|
end_date: string | null;
|
|
81
82
|
start_date: string | null;
|
|
82
83
|
directions: string | null;
|
|
83
84
|
dosage: string | null;
|
|
84
|
-
frequency: string | null;
|
|
85
85
|
}[];
|
|
86
86
|
}, {
|
|
87
87
|
medications: {
|
|
@@ -89,12 +89,12 @@ export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
|
89
89
|
name: string | null;
|
|
90
90
|
id: string;
|
|
91
91
|
active: boolean | null;
|
|
92
|
+
frequency: string | null;
|
|
92
93
|
comment: string | null;
|
|
93
94
|
end_date: string | null;
|
|
94
95
|
start_date: string | null;
|
|
95
96
|
directions: string | null;
|
|
96
97
|
dosage: string | null;
|
|
97
|
-
frequency: string | null;
|
|
98
98
|
}[];
|
|
99
99
|
}>;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -104,12 +104,12 @@ export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
|
104
104
|
name: string | null;
|
|
105
105
|
id: string;
|
|
106
106
|
active: boolean | null;
|
|
107
|
+
frequency: string | null;
|
|
107
108
|
comment: string | null;
|
|
108
109
|
end_date: string | null;
|
|
109
110
|
start_date: string | null;
|
|
110
111
|
directions: string | null;
|
|
111
112
|
dosage: string | null;
|
|
112
|
-
frequency: string | null;
|
|
113
113
|
}[];
|
|
114
114
|
};
|
|
115
115
|
}, {
|
|
@@ -119,12 +119,12 @@ export declare const medicationsGraphqlSchema: z.ZodObject<{
|
|
|
119
119
|
name: string | null;
|
|
120
120
|
id: string;
|
|
121
121
|
active: boolean | null;
|
|
122
|
+
frequency: string | null;
|
|
122
123
|
comment: string | null;
|
|
123
124
|
end_date: string | null;
|
|
124
125
|
start_date: string | null;
|
|
125
126
|
directions: string | null;
|
|
126
127
|
dosage: string | null;
|
|
127
|
-
frequency: string | null;
|
|
128
128
|
}[];
|
|
129
129
|
};
|
|
130
130
|
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AllergyIntolerance } from "@medplum/fhirtypes";
|
|
2
|
+
export interface AllergyValidationResult {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
errors: string[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Validates an AllergyIntolerance resource for Practice Fusion-specific requirements.
|
|
8
|
+
* Use this AFTER AJV validation to check constraints not covered by JSON schema.
|
|
9
|
+
*
|
|
10
|
+
* Checks:
|
|
11
|
+
* - Practice Fusion: code is required (FHIR says 0..1, but PF requires it)
|
|
12
|
+
* - FHIR ait-1: clinicalStatus SHALL be present if verificationStatus is not entered-in-error
|
|
13
|
+
* - FHIR ait-2: clinicalStatus SHALL NOT be present if verificationStatus is entered-in-error
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateAllergyIntoleranceForWrite(allergy: AllergyIntolerance): AllergyValidationResult;
|
|
16
|
+
//# sourceMappingURL=allergy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allergy.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/allergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAC9C,OAAO,EAAE,kBAAkB,GAC5B,uBAAuB,CAmCzB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateAllergyIntoleranceForWrite = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Validates an AllergyIntolerance resource for Practice Fusion-specific requirements.
|
|
6
|
+
* Use this AFTER AJV validation to check constraints not covered by JSON schema.
|
|
7
|
+
*
|
|
8
|
+
* Checks:
|
|
9
|
+
* - Practice Fusion: code is required (FHIR says 0..1, but PF requires it)
|
|
10
|
+
* - FHIR ait-1: clinicalStatus SHALL be present if verificationStatus is not entered-in-error
|
|
11
|
+
* - FHIR ait-2: clinicalStatus SHALL NOT be present if verificationStatus is entered-in-error
|
|
12
|
+
*/
|
|
13
|
+
function validateAllergyIntoleranceForWrite(allergy) {
|
|
14
|
+
const errors = [];
|
|
15
|
+
// Practice Fusion requires code (even though FHIR says 0..1)
|
|
16
|
+
if (!allergy.code) {
|
|
17
|
+
errors.push("code is required (Practice Fusion requirement)");
|
|
18
|
+
}
|
|
19
|
+
else if (!allergy.code.coding?.length && !allergy.code.text) {
|
|
20
|
+
errors.push("code must have at least coding or text");
|
|
21
|
+
}
|
|
22
|
+
// Check if verificationStatus is entered-in-error
|
|
23
|
+
const isEnteredInError = allergy.verificationStatus?.coding?.some(c => c.system === "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" &&
|
|
24
|
+
c.code === "entered-in-error");
|
|
25
|
+
// Constraint ait-1: clinicalStatus SHALL be present if verificationStatus is not entered-in-error
|
|
26
|
+
if (!isEnteredInError && !allergy.clinicalStatus) {
|
|
27
|
+
errors.push("clinicalStatus is required when verificationStatus is not entered-in-error (FHIR ait-1)");
|
|
28
|
+
}
|
|
29
|
+
// Constraint ait-2: clinicalStatus SHALL NOT be present if verificationStatus is entered-in-error
|
|
30
|
+
if (isEnteredInError && allergy.clinicalStatus) {
|
|
31
|
+
errors.push("clinicalStatus must not be present when verificationStatus is entered-in-error (FHIR ait-2)");
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
isValid: errors.length === 0,
|
|
35
|
+
errors,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.validateAllergyIntoleranceForWrite = validateAllergyIntoleranceForWrite;
|
|
39
|
+
//# sourceMappingURL=allergy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allergy.js","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/allergy.ts"],"names":[],"mappings":";;;AAOA;;;;;;;;GAQG;AACH,SAAgB,kCAAkC,CAC9C,OAA2B;IAE3B,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,6DAA6D;IAC7D,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QACf,MAAM,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;KACjE;SAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE;QAC3D,MAAM,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;KACzD;IAED,kDAAkD;IAClD,MAAM,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAC7D,CAAC,CAAC,EAAE,CACA,CAAC,CAAC,MAAM,KAAK,uEAAuE;QACpF,CAAC,CAAC,IAAI,KAAK,kBAAkB,CACpC,CAAC;IAEF,kGAAkG;IAClG,IAAI,CAAC,gBAAgB,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;QAC9C,MAAM,CAAC,IAAI,CACP,yFAAyF,CAC5F,CAAC;KACL;IAED,kGAAkG;IAClG,IAAI,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE;QAC5C,MAAM,CAAC,IAAI,CACP,6FAA6F,CAChG,CAAC;KACL;IAED,OAAO;QACH,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM;KACT,CAAC;AACN,CAAC;AArCD,gFAqCC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const appointmentTypeSchema: z.ZodObject<{
|
|
3
|
+
eventCategory: z.ZodEnum<["Appointment", "BlockedTime"]>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
6
|
+
}, {
|
|
7
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
8
|
+
}>;
|
|
9
|
+
export declare const appointmentSchema: z.ZodObject<{
|
|
10
|
+
eventId: z.ZodString;
|
|
11
|
+
patientPracticeGuid: z.ZodOptional<z.ZodString>;
|
|
12
|
+
eventType: z.ZodObject<{
|
|
13
|
+
eventCategory: z.ZodEnum<["Appointment", "BlockedTime"]>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
16
|
+
}, {
|
|
17
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
18
|
+
}>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
eventType: {
|
|
21
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
22
|
+
};
|
|
23
|
+
eventId: string;
|
|
24
|
+
patientPracticeGuid?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
eventType: {
|
|
27
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
28
|
+
};
|
|
29
|
+
eventId: string;
|
|
30
|
+
patientPracticeGuid?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type Appointment = z.infer<typeof appointmentSchema>;
|
|
33
|
+
export declare const bookedAppointmentSchema: z.ZodObject<{
|
|
34
|
+
patientId: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
patientId: string;
|
|
37
|
+
}, {
|
|
38
|
+
patientId: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type BookedAppointment = z.infer<typeof bookedAppointmentSchema>;
|
|
41
|
+
export declare const appointmentRefSchema: z.ZodObject<{
|
|
42
|
+
event: z.ZodObject<{
|
|
43
|
+
eventId: z.ZodString;
|
|
44
|
+
patientPracticeGuid: z.ZodOptional<z.ZodString>;
|
|
45
|
+
eventType: z.ZodObject<{
|
|
46
|
+
eventCategory: z.ZodEnum<["Appointment", "BlockedTime"]>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
49
|
+
}, {
|
|
50
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
51
|
+
}>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
eventType: {
|
|
54
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
55
|
+
};
|
|
56
|
+
eventId: string;
|
|
57
|
+
patientPracticeGuid?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
eventType: {
|
|
60
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
61
|
+
};
|
|
62
|
+
eventId: string;
|
|
63
|
+
patientPracticeGuid?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
event: {
|
|
67
|
+
eventType: {
|
|
68
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
69
|
+
};
|
|
70
|
+
eventId: string;
|
|
71
|
+
patientPracticeGuid?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
event: {
|
|
75
|
+
eventType: {
|
|
76
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
77
|
+
};
|
|
78
|
+
eventId: string;
|
|
79
|
+
patientPracticeGuid?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
export declare const appointmentsQueryResultSchema: z.ZodObject<{
|
|
83
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
nextPageToken: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
nextPageToken?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
nextPageToken?: string | undefined;
|
|
89
|
+
}>>;
|
|
90
|
+
events: z.ZodArray<z.ZodObject<{
|
|
91
|
+
eventId: z.ZodString;
|
|
92
|
+
patientPracticeGuid: z.ZodOptional<z.ZodString>;
|
|
93
|
+
eventType: z.ZodObject<{
|
|
94
|
+
eventCategory: z.ZodEnum<["Appointment", "BlockedTime"]>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
97
|
+
}, {
|
|
98
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
99
|
+
}>;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
eventType: {
|
|
102
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
103
|
+
};
|
|
104
|
+
eventId: string;
|
|
105
|
+
patientPracticeGuid?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
eventType: {
|
|
108
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
109
|
+
};
|
|
110
|
+
eventId: string;
|
|
111
|
+
patientPracticeGuid?: string | undefined;
|
|
112
|
+
}>, "many">;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
events: {
|
|
115
|
+
eventType: {
|
|
116
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
117
|
+
};
|
|
118
|
+
eventId: string;
|
|
119
|
+
patientPracticeGuid?: string | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
meta?: {
|
|
122
|
+
nextPageToken?: string | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
}, {
|
|
125
|
+
events: {
|
|
126
|
+
eventType: {
|
|
127
|
+
eventCategory: "Appointment" | "BlockedTime";
|
|
128
|
+
};
|
|
129
|
+
eventId: string;
|
|
130
|
+
patientPracticeGuid?: string | undefined;
|
|
131
|
+
}[];
|
|
132
|
+
meta?: {
|
|
133
|
+
nextPageToken?: string | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
export type AppointmentsQueryResult = z.infer<typeof appointmentsQueryResultSchema>;
|
|
137
|
+
//# sourceMappingURL=appointment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/appointment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;EAI5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAGxE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/B,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appointmentsQueryResultSchema = exports.appointmentRefSchema = exports.bookedAppointmentSchema = exports.appointmentSchema = exports.appointmentTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.appointmentTypeSchema = zod_1.z.object({
|
|
6
|
+
eventCategory: zod_1.z.enum(["Appointment", "BlockedTime"]),
|
|
7
|
+
});
|
|
8
|
+
exports.appointmentSchema = zod_1.z.object({
|
|
9
|
+
eventId: zod_1.z.string(),
|
|
10
|
+
patientPracticeGuid: zod_1.z.string().optional(),
|
|
11
|
+
eventType: exports.appointmentTypeSchema,
|
|
12
|
+
});
|
|
13
|
+
exports.bookedAppointmentSchema = zod_1.z.object({
|
|
14
|
+
patientId: zod_1.z.string(),
|
|
15
|
+
});
|
|
16
|
+
// Single event response: GET /events/{eventId}
|
|
17
|
+
exports.appointmentRefSchema = zod_1.z.object({
|
|
18
|
+
event: exports.appointmentSchema,
|
|
19
|
+
});
|
|
20
|
+
// Query response: GET /events/query - events are NOT wrapped
|
|
21
|
+
exports.appointmentsQueryResultSchema = zod_1.z.object({
|
|
22
|
+
meta: zod_1.z
|
|
23
|
+
.object({
|
|
24
|
+
nextPageToken: zod_1.z.string().optional(),
|
|
25
|
+
})
|
|
26
|
+
.optional(),
|
|
27
|
+
events: exports.appointmentSchema.array(),
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=appointment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment.js","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/appointment.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;CACtD,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,6BAAqB;CACjC,CAAC,CAAC;AAGU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGH,+CAA+C;AAClC,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,yBAAiB;CACzB,CAAC,CAAC;AAEH,6DAA6D;AAChD,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,OAAC;SACJ,MAAM,CAAC;QACN,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,yBAAiB,CAAC,KAAK,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Schema for FHIR Condition response from PracticeFusion.
|
|
4
|
+
* PracticeFusion returns the created FHIR resource with an ID.
|
|
5
|
+
*/
|
|
6
|
+
export declare const createdConditionSchema: z.ZodObject<{
|
|
7
|
+
resourceType: z.ZodLiteral<"Condition">;
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
resourceType: "Condition";
|
|
11
|
+
id: string;
|
|
12
|
+
}, {
|
|
13
|
+
resourceType: "Condition";
|
|
14
|
+
id: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type CreatedCondition = z.infer<typeof createdConditionSchema>;
|
|
17
|
+
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createdConditionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Schema for FHIR Condition response from PracticeFusion.
|
|
7
|
+
* PracticeFusion returns the created FHIR resource with an ID.
|
|
8
|
+
*/
|
|
9
|
+
exports.createdConditionSchema = zod_1.z.object({
|
|
10
|
+
resourceType: zod_1.z.literal("Condition"),
|
|
11
|
+
id: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.js","sourceRoot":"","sources":["../../../../../src/interface/external/ehr/practicefusion/condition.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;;GAGG;AACU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,OAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACpC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAC"}
|