@metriport/shared 0.28.1 → 0.29.0-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.
- package/dist/common/string.d.ts +6 -0
- package/dist/common/string.d.ts.map +1 -1
- package/dist/common/string.js +14 -1
- package/dist/common/string.js.map +1 -1
- package/dist/domain/care-gap.d.ts +49 -0
- package/dist/domain/care-gap.d.ts.map +1 -0
- package/dist/domain/care-gap.js +3 -0
- package/dist/domain/care-gap.js.map +1 -0
- package/dist/domain/cohort.d.ts +1 -0
- package/dist/domain/cohort.d.ts.map +1 -1
- package/dist/domain/cohort.js +2 -1
- package/dist/domain/cohort.js.map +1 -1
- package/dist/domain/cql-engine/transform.d.ts +32 -0
- package/dist/domain/cql-engine/transform.d.ts.map +1 -0
- package/dist/domain/cql-engine/transform.js +19 -0
- package/dist/domain/cql-engine/transform.js.map +1 -0
- package/dist/domain/network-query/query.d.ts +52 -0
- package/dist/domain/network-query/query.d.ts.map +1 -0
- package/dist/domain/network-query/query.js +19 -0
- package/dist/domain/network-query/query.js.map +1 -0
- package/dist/domain/network-query/source.d.ts +35 -0
- package/dist/domain/network-query/source.d.ts.map +1 -0
- package/dist/domain/network-query/source.js +15 -0
- package/dist/domain/network-query/source.js.map +1 -0
- package/dist/domain/organization.d.ts +3 -0
- package/dist/domain/organization.d.ts.map +1 -1
- package/dist/domain/organization.js +1 -0
- package/dist/domain/organization.js.map +1 -1
- package/dist/domain/patient-or-all.d.ts +18 -0
- package/dist/domain/patient-or-all.d.ts.map +1 -1
- package/dist/domain/patient-or-all.js +11 -5
- package/dist/domain/patient-or-all.js.map +1 -1
- package/dist/domain/patient.d.ts +18 -3
- package/dist/domain/patient.d.ts.map +1 -1
- package/dist/domain/patient.js +7 -1
- package/dist/domain/patient.js.map +1 -1
- package/dist/domain/roster/patient-roster.d.ts +16 -0
- package/dist/domain/roster/patient-roster.d.ts.map +1 -0
- package/dist/domain/roster/patient-roster.js +3 -0
- package/dist/domain/roster/patient-roster.js.map +1 -0
- package/dist/domain/roster/roster-status.d.ts +16 -0
- package/dist/domain/roster/roster-status.d.ts.map +1 -0
- package/dist/domain/roster/roster-status.js +49 -0
- package/dist/domain/roster/roster-status.js.map +1 -0
- package/dist/domain/roster/roster.d.ts +39 -0
- package/dist/domain/roster/roster.d.ts.map +1 -0
- package/dist/domain/roster/roster.js +3 -0
- package/dist/domain/roster/roster.js.map +1 -0
- package/dist/external/hl7v2/constants.d.ts +1 -0
- package/dist/external/hl7v2/constants.d.ts.map +1 -1
- package/dist/external/hl7v2/constants.js +2 -1
- package/dist/external/hl7v2/constants.js.map +1 -1
- package/dist/external/ihe/constants.d.ts +6 -0
- package/dist/external/ihe/constants.d.ts.map +1 -0
- package/dist/external/ihe/constants.js +8 -0
- package/dist/external/ihe/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts +4 -4
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +0 -3
- package/dist/interface/external/ehr/canvas/cx-mapping.d.ts.map +1 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.js +0 -1
- package/dist/interface/external/ehr/canvas/cx-mapping.js.map +1 -1
- package/dist/interface/external/ehr/canvas/jwt-token.d.ts +6 -6
- package/dist/interface/external/ehr/eclinicalworks/jwt-token.d.ts +2 -2
- package/dist/interface/external/ehr/elation/cx-mapping.d.ts +2 -2
- package/dist/interface/external/ehr/elation/jwt-token.d.ts +4 -4
- package/dist/interface/external/ehr/embed/cx-mapping.d.ts +4 -0
- package/dist/interface/external/ehr/embed/cx-mapping.d.ts.map +1 -0
- package/dist/interface/external/ehr/embed/cx-mapping.js +6 -0
- package/dist/interface/external/ehr/embed/cx-mapping.js.map +1 -0
- package/dist/interface/external/ehr/embed/index.d.ts +3 -0
- package/dist/interface/external/ehr/embed/index.d.ts.map +1 -0
- package/dist/interface/external/{canvas → ehr/embed}/index.js +1 -1
- package/dist/interface/external/ehr/embed/index.js.map +1 -0
- package/dist/interface/external/ehr/embed/jwt-token.d.ts +28 -0
- package/dist/interface/external/ehr/embed/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/embed/jwt-token.js +23 -0
- package/dist/interface/external/ehr/embed/jwt-token.js.map +1 -0
- package/dist/interface/external/ehr/healthie/cx-mapping.d.ts +2 -2
- package/dist/interface/external/ehr/healthie/jwt-token.d.ts +2 -2
- package/dist/interface/external/ehr/practicefusion/index.d.ts +2 -0
- package/dist/interface/external/ehr/practicefusion/index.d.ts.map +1 -0
- package/dist/interface/external/{elation → ehr/practicefusion}/index.js +0 -2
- package/dist/interface/external/ehr/practicefusion/index.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts +21 -0
- package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/jwt-token.js +16 -0
- package/dist/interface/external/ehr/practicefusion/jwt-token.js.map +1 -0
- package/dist/interface/external/ehr/practicefusion/patient.d.ts +2 -0
- package/dist/interface/external/ehr/practicefusion/patient.d.ts.map +1 -0
- package/dist/interface/external/ehr/practicefusion/patient.js +6 -0
- package/dist/interface/external/ehr/practicefusion/patient.js.map +1 -0
- package/dist/interface/external/ehr/salesforce/jwt-token.d.ts +2 -2
- package/dist/interface/external/ehr/source.d.ts +6 -1
- package/dist/interface/external/ehr/source.d.ts.map +1 -1
- package/dist/interface/external/ehr/source.js +7 -1
- package/dist/interface/external/ehr/source.js.map +1 -1
- package/dist/interface/external/quest/roster.d.ts +21 -0
- package/dist/interface/external/quest/roster.d.ts.map +1 -0
- package/dist/interface/external/quest/roster.js +39 -0
- package/dist/interface/external/quest/roster.js.map +1 -0
- package/dist/interface/external/surescripts/roster.d.ts +12 -0
- package/dist/interface/external/surescripts/roster.d.ts.map +1 -0
- package/dist/interface/external/surescripts/roster.js +29 -0
- package/dist/interface/external/surescripts/roster.js.map +1 -0
- package/dist/interface/external/surescripts/source.d.ts +2 -0
- package/dist/interface/external/surescripts/source.d.ts.map +1 -0
- package/dist/interface/external/surescripts/source.js +5 -0
- package/dist/interface/external/surescripts/source.js.map +1 -0
- package/package.json +2 -2
- package/dist/domain/patient/patient-import.d.ts +0 -131
- package/dist/domain/patient/patient-import.d.ts.map +0 -1
- package/dist/domain/patient/patient-import.js +0 -32
- package/dist/domain/patient/patient-import.js.map +0 -1
- package/dist/interface/external/athenahealth/appointment.d.ts +0 -63
- package/dist/interface/external/athenahealth/appointment.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/appointment.js +0 -18
- package/dist/interface/external/athenahealth/appointment.js.map +0 -1
- package/dist/interface/external/athenahealth/cx-mapping.d.ts +0 -10
- package/dist/interface/external/athenahealth/cx-mapping.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/cx-mapping.js +0 -8
- package/dist/interface/external/athenahealth/cx-mapping.js.map +0 -1
- package/dist/interface/external/athenahealth/department.d.ts +0 -28
- package/dist/interface/external/athenahealth/department.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/department.js +0 -11
- package/dist/interface/external/athenahealth/department.js.map +0 -1
- package/dist/interface/external/athenahealth/index.d.ts +0 -9
- package/dist/interface/external/athenahealth/index.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/index.js +0 -25
- package/dist/interface/external/athenahealth/index.js.map +0 -1
- package/dist/interface/external/athenahealth/jwt-token.d.ts +0 -34
- package/dist/interface/external/athenahealth/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/jwt-token.js +0 -18
- package/dist/interface/external/athenahealth/jwt-token.js.map +0 -1
- package/dist/interface/external/athenahealth/medication.d.ts +0 -50
- package/dist/interface/external/athenahealth/medication.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/medication.js +0 -19
- package/dist/interface/external/athenahealth/medication.js.map +0 -1
- package/dist/interface/external/athenahealth/problem.d.ts +0 -27
- package/dist/interface/external/athenahealth/problem.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/problem.js +0 -14
- package/dist/interface/external/athenahealth/problem.js.map +0 -1
- package/dist/interface/external/athenahealth/subscription.d.ts +0 -20
- package/dist/interface/external/athenahealth/subscription.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/subscription.js +0 -11
- package/dist/interface/external/athenahealth/subscription.js.map +0 -1
- package/dist/interface/external/athenahealth/vitals.d.ts +0 -82
- package/dist/interface/external/athenahealth/vitals.d.ts.map +0 -1
- package/dist/interface/external/athenahealth/vitals.js +0 -15
- package/dist/interface/external/athenahealth/vitals.js.map +0 -1
- package/dist/interface/external/canvas/appointment.d.ts +0 -68
- package/dist/interface/external/canvas/appointment.d.ts.map +0 -1
- package/dist/interface/external/canvas/appointment.js +0 -15
- package/dist/interface/external/canvas/appointment.js.map +0 -1
- package/dist/interface/external/canvas/index.d.ts +0 -3
- package/dist/interface/external/canvas/index.d.ts.map +0 -1
- package/dist/interface/external/canvas/index.js.map +0 -1
- package/dist/interface/external/canvas/jwt-token.d.ts +0 -31
- package/dist/interface/external/canvas/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/canvas/jwt-token.js +0 -17
- package/dist/interface/external/canvas/jwt-token.js.map +0 -1
- package/dist/interface/external/elation/appointment.d.ts +0 -68
- package/dist/interface/external/elation/appointment.d.ts.map +0 -1
- package/dist/interface/external/elation/appointment.js +0 -15
- package/dist/interface/external/elation/appointment.js.map +0 -1
- package/dist/interface/external/elation/index.d.ts +0 -4
- package/dist/interface/external/elation/index.d.ts.map +0 -1
- package/dist/interface/external/elation/index.js.map +0 -1
- package/dist/interface/external/elation/jwt-token.d.ts +0 -20
- package/dist/interface/external/elation/jwt-token.d.ts.map +0 -1
- package/dist/interface/external/elation/jwt-token.js +0 -13
- package/dist/interface/external/elation/jwt-token.js.map +0 -1
- package/dist/interface/external/elation/patient.d.ts +0 -96
- package/dist/interface/external/elation/patient.d.ts.map +0 -1
- package/dist/interface/external/elation/patient.js +0 -33
- package/dist/interface/external/elation/patient.js.map +0 -1
- package/dist/interface/external/shared/ehr/patient.d.ts +0 -250
- package/dist/interface/external/shared/ehr/patient.d.ts.map +0 -1
- package/dist/interface/external/shared/ehr/patient.js +0 -35
- package/dist/interface/external/shared/ehr/patient.js.map +0 -1
package/dist/common/string.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare function limitStringLength<T extends string | undefined>(value: T, max?: number, suffix?: string): T;
|
|
2
2
|
export declare function stripNonNumericChars(str: string): string;
|
|
3
3
|
export declare function stripPeriods(str: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Prevents a class of errors where foo.bar?.trim() is called on unknown data (e.g. a FHIR resource),
|
|
6
|
+
* which throws an error when bar is not a string as expected by the type. This also converts unexpected
|
|
7
|
+
* numbers back to a string when returning the trimmed result.
|
|
8
|
+
*/
|
|
9
|
+
export declare function trimWhitespace(str: unknown): string | undefined;
|
|
4
10
|
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5D,KAAK,EAAE,CAAC,EACR,GAAG,SAAM,EACT,MAAM,SAAQ,GACb,CAAC,CAOH;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,EAC5D,KAAK,EAAE,CAAC,EACR,GAAG,SAAM,EACT,MAAM,SAAQ,GACb,CAAC,CAOH;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI/D"}
|
package/dist/common/string.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stripPeriods = exports.stripNonNumericChars = exports.limitStringLength = void 0;
|
|
3
|
+
exports.trimWhitespace = exports.stripPeriods = exports.stripNonNumericChars = exports.limitStringLength = void 0;
|
|
4
4
|
function limitStringLength(value, max = 255, suffix = "...") {
|
|
5
5
|
if (!value)
|
|
6
6
|
return value;
|
|
@@ -17,4 +17,17 @@ function stripPeriods(str) {
|
|
|
17
17
|
return str.trim().replace(/\./g, "");
|
|
18
18
|
}
|
|
19
19
|
exports.stripPeriods = stripPeriods;
|
|
20
|
+
/**
|
|
21
|
+
* Prevents a class of errors where foo.bar?.trim() is called on unknown data (e.g. a FHIR resource),
|
|
22
|
+
* which throws an error when bar is not a string as expected by the type. This also converts unexpected
|
|
23
|
+
* numbers back to a string when returning the trimmed result.
|
|
24
|
+
*/
|
|
25
|
+
function trimWhitespace(str) {
|
|
26
|
+
if (typeof str === "number")
|
|
27
|
+
return str.toString();
|
|
28
|
+
if (typeof str !== "string")
|
|
29
|
+
return undefined;
|
|
30
|
+
return str.trim();
|
|
31
|
+
}
|
|
32
|
+
exports.trimWhitespace = trimWhitespace;
|
|
20
33
|
//# sourceMappingURL=string.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/common/string.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAC/B,KAAQ,EACR,GAAG,GAAG,GAAG,EACT,MAAM,GAAG,KAAK;IAEd,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IAC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,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAFD,oCAEC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAY;IACzC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACnD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC9C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC;AAJD,wCAIC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BaseDomain, BaseDomainCreate } from "./base-domain";
|
|
2
|
+
export interface Coding {
|
|
3
|
+
system: string;
|
|
4
|
+
code: string;
|
|
5
|
+
display?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CodeableConcept {
|
|
8
|
+
coding: Coding[];
|
|
9
|
+
text?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Reference {
|
|
12
|
+
reference: string;
|
|
13
|
+
display?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Period {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
}
|
|
19
|
+
export interface MeasureReportPopulation {
|
|
20
|
+
code: CodeableConcept;
|
|
21
|
+
count: number;
|
|
22
|
+
}
|
|
23
|
+
export interface MeasureReportGroup {
|
|
24
|
+
id: string;
|
|
25
|
+
code: CodeableConcept;
|
|
26
|
+
population: MeasureReportPopulation[];
|
|
27
|
+
}
|
|
28
|
+
export interface MeasureReport {
|
|
29
|
+
resourceType: "MeasureReport";
|
|
30
|
+
id: string;
|
|
31
|
+
status: string;
|
|
32
|
+
type: string;
|
|
33
|
+
measure: string;
|
|
34
|
+
subject: Reference;
|
|
35
|
+
period: Period;
|
|
36
|
+
group: MeasureReportGroup[];
|
|
37
|
+
}
|
|
38
|
+
export interface CareGapCreate extends Omit<BaseDomainCreate, "id"> {
|
|
39
|
+
cxId: string;
|
|
40
|
+
patientId: string;
|
|
41
|
+
measureName: string;
|
|
42
|
+
jobId: string;
|
|
43
|
+
measureReport: MeasureReport;
|
|
44
|
+
supportingEvidence: Record<string, unknown>;
|
|
45
|
+
lastRun: Date;
|
|
46
|
+
}
|
|
47
|
+
export interface CareGap extends BaseDomain, CareGapCreate {
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=care-gap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"care-gap.d.ts","sourceRoot":"","sources":["../../src/domain/care-gap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE7D,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,uBAAuB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,eAAe,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,aAAa,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,OAAQ,SAAQ,UAAU,EAAE,aAAa;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"care-gap.js","sourceRoot":"","sources":["../../src/domain/care-gap.ts"],"names":[],"mappings":""}
|
package/dist/domain/cohort.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { DeepPartial } from "../common/merge-settings";
|
|
|
2
2
|
import { BaseDomain } from "./base-domain";
|
|
3
3
|
import { BaseDTO } from "./baseDto";
|
|
4
4
|
export declare const COHORT_COLORS: readonly ["red", "green", "blue", "yellow", "purple", "orange", "pink", "brown", "gray", "black", "white"];
|
|
5
|
+
export declare const STATE_VALIDATION_OVERRIDE_KEY = "Filter_By_Patient_State";
|
|
5
6
|
export declare const COHORT_FREQUENCIES: readonly ["monthly", "biweekly", "weekly"];
|
|
6
7
|
export declare const DEFAULT_COLOR = "white";
|
|
7
8
|
export declare const DEFAULT_FREQUENCY = "monthly";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohort.d.ts","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AAE/C,eAAO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CAAC,CAAC,GAAG;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;AAE5F,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC9E,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG;IACpD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IAC9F,QAAQ,EAAE,wBAAwB,CAAC;CACpC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,8BAA8B,CAWpF;AAED,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMxD"}
|
package/dist/domain/cohort.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeCohortName = exports.cohortPatientMaxPageSize = exports.responseDtoFromCohort = exports.DEFAULT_SETTINGS = exports.DEFAULT_OVERRIDES = exports.DEFAULT_MONITORING = exports.DEFAULT_NOTIFICATION_SCHEDULE = exports.DEFAULT_NOTIFICATION = exports.DEFAULT_SCHEDULE = exports.DEFAULT_FREQUENCY = exports.DEFAULT_COLOR = exports.COHORT_FREQUENCIES = exports.COHORT_COLORS = void 0;
|
|
3
|
+
exports.normalizeCohortName = exports.cohortPatientMaxPageSize = exports.responseDtoFromCohort = exports.DEFAULT_SETTINGS = exports.DEFAULT_OVERRIDES = exports.DEFAULT_MONITORING = exports.DEFAULT_NOTIFICATION_SCHEDULE = exports.DEFAULT_NOTIFICATION = exports.DEFAULT_SCHEDULE = exports.DEFAULT_FREQUENCY = exports.DEFAULT_COLOR = exports.COHORT_FREQUENCIES = exports.STATE_VALIDATION_OVERRIDE_KEY = exports.COHORT_COLORS = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const bad_request_1 = require("../error/bad-request");
|
|
6
6
|
const baseDto_1 = require("./baseDto");
|
|
@@ -17,6 +17,7 @@ exports.COHORT_COLORS = [
|
|
|
17
17
|
"black",
|
|
18
18
|
"white",
|
|
19
19
|
];
|
|
20
|
+
exports.STATE_VALIDATION_OVERRIDE_KEY = "Filter_By_Patient_State";
|
|
20
21
|
exports.COHORT_FREQUENCIES = ["monthly", "biweekly", "weekly"];
|
|
21
22
|
exports.DEFAULT_COLOR = "white";
|
|
22
23
|
exports.DEFAULT_FREQUENCY = "monthly";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohort.js","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,sDAAuD;AAEvD,uCAA+C;AAElC,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;
|
|
1
|
+
{"version":3,"file":"cohort.js","sourceRoot":"","sources":["../../src/domain/cohort.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,sDAAuD;AAEvD,uCAA+C;AA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AE,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAClD,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,wBAAwB;KACnC,CAAC;AACJ,CAAC;AAXD,sDAWC;AACD,0BAA0B;AACb,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE5C,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,MAAM,IAAI,6BAAe,CAAC,6BAA6B,CAAC,CAAC;KAC1D;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAND,kDAMC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const executionModeSchema: z.ZodEnum<["cli", "engine"]>;
|
|
3
|
+
export type ExecutionMode = z.infer<typeof executionModeSchema>;
|
|
4
|
+
export declare const cqlParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5
|
+
export type CqlParameters = z.infer<typeof cqlParametersSchema>;
|
|
6
|
+
export declare const cqlTransformSchema: z.ZodObject<{
|
|
7
|
+
cxId: z.ZodString;
|
|
8
|
+
patientId: z.ZodString;
|
|
9
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
patientBundleS3Key: z.ZodOptional<z.ZodString>;
|
|
11
|
+
measuresToExecute: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
mode: z.ZodOptional<z.ZodEnum<["cli", "engine"]>>;
|
|
13
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
cxId: string;
|
|
16
|
+
patientId: string;
|
|
17
|
+
jobId?: string | undefined;
|
|
18
|
+
patientBundleS3Key?: string | undefined;
|
|
19
|
+
measuresToExecute?: string[] | undefined;
|
|
20
|
+
mode?: "engine" | "cli" | undefined;
|
|
21
|
+
parameters?: Record<string, unknown> | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
cxId: string;
|
|
24
|
+
patientId: string;
|
|
25
|
+
jobId?: string | undefined;
|
|
26
|
+
patientBundleS3Key?: string | undefined;
|
|
27
|
+
measuresToExecute?: string[] | undefined;
|
|
28
|
+
mode?: "engine" | "cli" | undefined;
|
|
29
|
+
parameters?: Record<string, unknown> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export type CqlTransformRequest = z.infer<typeof cqlTransformSchema>;
|
|
32
|
+
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/domain/cql-engine/transform.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,mBAAmB,8BAA4B,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB,wCAAoC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cqlTransformSchema = exports.cqlParametersSchema = exports.executionModeSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.executionModeSchema = zod_1.default.enum(["cli", "engine"]);
|
|
9
|
+
exports.cqlParametersSchema = zod_1.default.record(zod_1.default.string(), zod_1.default.unknown());
|
|
10
|
+
exports.cqlTransformSchema = zod_1.default.object({
|
|
11
|
+
cxId: zod_1.default.string(),
|
|
12
|
+
patientId: zod_1.default.string(),
|
|
13
|
+
jobId: zod_1.default.string().optional(),
|
|
14
|
+
patientBundleS3Key: zod_1.default.string().optional(),
|
|
15
|
+
measuresToExecute: zod_1.default.array(zod_1.default.string()).optional(),
|
|
16
|
+
mode: exports.executionModeSchema.optional(),
|
|
17
|
+
parameters: exports.cqlParametersSchema.optional(),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/domain/cql-engine/transform.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AAEP,QAAA,mBAAmB,GAAG,aAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGhD,QAAA,mBAAmB,GAAG,aAAC,CAAC,MAAM,CAAC,aAAC,CAAC,MAAM,EAAE,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAGxD,QAAA,kBAAkB,GAAG,aAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,kBAAkB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,iBAAiB,EAAE,aAAC,CAAC,KAAK,CAAC,aAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjD,IAAI,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,2BAAmB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { NetworkSource } from "./source";
|
|
3
|
+
export declare const networkQueryBodySchema: z.ZodObject<{
|
|
4
|
+
sources: z.ZodArray<z.ZodEnum<["hie", "pharmacy", "laboratory"]>, "many">;
|
|
5
|
+
override: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
commonwell: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
carequality: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
sources: ("pharmacy" | "hie" | "laboratory")[];
|
|
11
|
+
override?: boolean | undefined;
|
|
12
|
+
commonwell?: boolean | undefined;
|
|
13
|
+
carequality?: boolean | undefined;
|
|
14
|
+
metadata?: Record<string, string> | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
sources: ("pharmacy" | "hie" | "laboratory")[];
|
|
17
|
+
override?: boolean | undefined;
|
|
18
|
+
commonwell?: boolean | undefined;
|
|
19
|
+
carequality?: boolean | undefined;
|
|
20
|
+
metadata?: Record<string, string> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const networkQueryParamsSchema: z.ZodObject<{
|
|
23
|
+
cxId: z.ZodString;
|
|
24
|
+
facilityId: z.ZodString;
|
|
25
|
+
patientId: z.ZodString;
|
|
26
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
cxId: string;
|
|
29
|
+
patientId: string;
|
|
30
|
+
facilityId: string;
|
|
31
|
+
requestId?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
cxId: string;
|
|
34
|
+
patientId: string;
|
|
35
|
+
facilityId: string;
|
|
36
|
+
requestId?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export type NetworkQueryCmd = {
|
|
39
|
+
cxId: string;
|
|
40
|
+
facilityId: string;
|
|
41
|
+
patientId: string;
|
|
42
|
+
sources: NetworkSource[];
|
|
43
|
+
override?: boolean;
|
|
44
|
+
commonwell?: boolean;
|
|
45
|
+
carequality?: boolean;
|
|
46
|
+
metadata?: Record<string, string>;
|
|
47
|
+
};
|
|
48
|
+
export type NetworkQueryStatusCmd = {
|
|
49
|
+
cxId: string;
|
|
50
|
+
patientId: string;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.networkQueryParamsSchema = exports.networkQueryBodySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const source_1 = require("./source");
|
|
6
|
+
exports.networkQueryBodySchema = zod_1.z.object({
|
|
7
|
+
sources: zod_1.z.array(source_1.networkSourceSchema).min(1),
|
|
8
|
+
override: zod_1.z.boolean().optional(),
|
|
9
|
+
commonwell: zod_1.z.boolean().optional(),
|
|
10
|
+
carequality: zod_1.z.boolean().optional(),
|
|
11
|
+
metadata: zod_1.z.record(zod_1.z.string().min(1).max(40), zod_1.z.string().max(500)).optional(),
|
|
12
|
+
});
|
|
13
|
+
exports.networkQueryParamsSchema = zod_1.z.object({
|
|
14
|
+
cxId: zod_1.z.string(),
|
|
15
|
+
facilityId: zod_1.z.string(),
|
|
16
|
+
patientId: zod_1.z.string(),
|
|
17
|
+
requestId: zod_1.z.string().optional(),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/domain/network-query/query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAA8D;AAEjD,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9E,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { NetworkQueryCmd, NetworkQueryStatusCmd } from "./query";
|
|
3
|
+
export declare const hieSource = "hie";
|
|
4
|
+
export declare const pharmacySource = "pharmacy";
|
|
5
|
+
export declare const laboratorySource = "laboratory";
|
|
6
|
+
export declare const networkSources: readonly ["hie", "pharmacy", "laboratory"];
|
|
7
|
+
export declare const networkSourceSchema: z.ZodEnum<["hie", "pharmacy", "laboratory"]>;
|
|
8
|
+
export type NetworkSource = (typeof networkSources)[number];
|
|
9
|
+
export declare function isNetworkSource(source: string): source is NetworkSource;
|
|
10
|
+
export declare const sourceQueryStatus: readonly ["processing", "completed", "failed"];
|
|
11
|
+
export type SourceQueryStatus = (typeof sourceQueryStatus)[number];
|
|
12
|
+
export type SourceQueryCmd = Omit<NetworkQueryCmd, "sources"> & {
|
|
13
|
+
source: NetworkSource;
|
|
14
|
+
};
|
|
15
|
+
export type SourceQueryStatusCmd = NetworkQueryStatusCmd & {
|
|
16
|
+
source: NetworkSource;
|
|
17
|
+
};
|
|
18
|
+
export interface SourceQueryProgress {
|
|
19
|
+
type: NetworkSource;
|
|
20
|
+
source?: string;
|
|
21
|
+
status: SourceQueryStatus;
|
|
22
|
+
startedAt?: Date;
|
|
23
|
+
requestId?: string;
|
|
24
|
+
documents?: {
|
|
25
|
+
downloadInProgress: number;
|
|
26
|
+
downloaded: number;
|
|
27
|
+
converted: number;
|
|
28
|
+
failed: number;
|
|
29
|
+
total: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface NetworkQueryProgress {
|
|
33
|
+
sources: SourceQueryProgress[];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/domain/network-query/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,cAAc,4CAAyD,CAAC;AACrF,eAAO,MAAM,mBAAmB,8CAAyB,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,aAAa,CAEvE;AAED,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAC1F,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAErF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sourceQueryStatus = exports.isNetworkSource = exports.networkSourceSchema = exports.networkSources = exports.laboratorySource = exports.pharmacySource = exports.hieSource = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.hieSource = "hie";
|
|
6
|
+
exports.pharmacySource = "pharmacy";
|
|
7
|
+
exports.laboratorySource = "laboratory";
|
|
8
|
+
exports.networkSources = [exports.hieSource, exports.pharmacySource, exports.laboratorySource];
|
|
9
|
+
exports.networkSourceSchema = zod_1.z.enum(exports.networkSources);
|
|
10
|
+
function isNetworkSource(source) {
|
|
11
|
+
return exports.networkSourceSchema.safeParse(source).success;
|
|
12
|
+
}
|
|
13
|
+
exports.isNetworkSource = isNetworkSource;
|
|
14
|
+
exports.sourceQueryStatus = ["processing", "completed", "failed"];
|
|
15
|
+
//# sourceMappingURL=source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/domain/network-query/source.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGX,QAAA,SAAS,GAAG,KAAK,CAAC;AAClB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,cAAc,GAAG,CAAC,iBAAS,EAAE,sBAAc,EAAE,wBAAgB,CAAU,CAAC;AACxE,QAAA,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,sBAAc,CAAC,CAAC;AAG1D,SAAgB,eAAe,CAAC,MAAc;IAC5C,OAAO,2BAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC;AAFD,0CAEC;AAEY,QAAA,iBAAiB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC"}
|
|
@@ -39,6 +39,7 @@ export declare const internalOrganizationDTOSchema: z.ZodObject<{
|
|
|
39
39
|
zip: string;
|
|
40
40
|
addressLine2?: string | undefined;
|
|
41
41
|
}>;
|
|
42
|
+
principalOid: z.ZodOptional<z.ZodString>;
|
|
42
43
|
businessType: z.ZodNativeEnum<typeof OrganizationBizType>;
|
|
43
44
|
cqApproved: z.ZodBoolean;
|
|
44
45
|
cqActive: z.ZodBoolean;
|
|
@@ -63,6 +64,7 @@ export declare const internalOrganizationDTOSchema: z.ZodObject<{
|
|
|
63
64
|
cwApproved: boolean;
|
|
64
65
|
cwActive: boolean;
|
|
65
66
|
shortcode?: string | undefined;
|
|
67
|
+
principalOid?: string | undefined;
|
|
66
68
|
}, {
|
|
67
69
|
name: string;
|
|
68
70
|
type: TreatmentType;
|
|
@@ -82,6 +84,7 @@ export declare const internalOrganizationDTOSchema: z.ZodObject<{
|
|
|
82
84
|
cwApproved: boolean;
|
|
83
85
|
cwActive: boolean;
|
|
84
86
|
shortcode?: string | undefined;
|
|
87
|
+
principalOid?: string | undefined;
|
|
85
88
|
}>;
|
|
86
89
|
export type InternalOrganizationDTO = z.infer<typeof internalOrganizationDTOSchema>;
|
|
87
90
|
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/domain/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAChC;AAGD,oBAAY,mBAAmB;IAC7B,kBAAkB,wBAAwB;IAC1C,kBAAkB,yBAAyB;CAC5C;AAED,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/domain/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAChC;AAGD,oBAAY,mBAAmB;IAC7B,kBAAkB,wBAAwB;IAC1C,kBAAkB,yBAAyB;CAC5C;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -31,6 +31,7 @@ exports.internalOrganizationDTOSchema = zod_1.z.object({
|
|
|
31
31
|
zip: zod_1.z.string(),
|
|
32
32
|
country: zod_1.z.string(),
|
|
33
33
|
}),
|
|
34
|
+
principalOid: zod_1.z.string().optional(),
|
|
34
35
|
businessType: zod_1.z.nativeEnum(OrganizationBizType),
|
|
35
36
|
cqApproved: zod_1.z.boolean(),
|
|
36
37
|
cqActive: zod_1.z.boolean(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../src/domain/organization.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,IAAY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CAAC,OAAO,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IACrB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IACvB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const patientIdsSchema: z.ZodArray<z.ZodString, "many">;
|
|
3
|
+
export declare const allPatientsSchema: z.ZodObject<{
|
|
4
|
+
allPatients: z.ZodLiteral<true>;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
allPatients: true;
|
|
7
|
+
}, {
|
|
8
|
+
allPatients: true;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const subsetPatientIdsSchema: z.ZodObject<{
|
|
11
|
+
patientIds: z.ZodArray<z.ZodString, "many">;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
patientIds: string[];
|
|
14
|
+
}, {
|
|
15
|
+
patientIds: string[];
|
|
16
|
+
}>;
|
|
3
17
|
export declare const allOrSubsetPatientIdsSchema: z.ZodUnion<[z.ZodObject<{
|
|
4
18
|
allPatients: z.ZodLiteral<true>;
|
|
5
19
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -13,4 +27,8 @@ export declare const allOrSubsetPatientIdsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
13
27
|
}, {
|
|
14
28
|
patientIds: string[];
|
|
15
29
|
}>]>;
|
|
30
|
+
export declare function strictlyValidateAllAndPatientIds({ patientIds, allPatients, }: {
|
|
31
|
+
patientIds: string[] | undefined;
|
|
32
|
+
allPatients: boolean | undefined;
|
|
33
|
+
}): void;
|
|
16
34
|
//# sourceMappingURL=patient-or-all.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient-or-all.d.ts","sourceRoot":"","sources":["../../src/domain/patient-or-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB,iCAAkD,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"patient-or-all.d.ts","sourceRoot":"","sources":["../../src/domain/patient-or-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB,iCAAkD,CAAC;AAEhF,eAAO,MAAM,iBAAiB;;;;;;EAAsD,CAAC;AACrF,eAAO,MAAM,sBAAsB;;;;;;EAAsD,CAAC;AAC1F,eAAO,MAAM,2BAA2B;;;;;;;;;;;;IAAuD,CAAC;AAEhG,wBAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACV,WAAW,GACZ,EAAE;IACD,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC,GAAG,IAAI,CAKP"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allOrSubsetPatientIdsSchema = exports.patientIdsSchema = void 0;
|
|
3
|
+
exports.strictlyValidateAllAndPatientIds = exports.allOrSubsetPatientIdsSchema = exports.subsetPatientIdsSchema = exports.allPatientsSchema = exports.patientIdsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const PATIENT_IDS_MIN_LENGTH = 1;
|
|
6
6
|
exports.patientIdsSchema = zod_1.z.array(zod_1.z.string()).min(PATIENT_IDS_MIN_LENGTH);
|
|
7
|
-
exports.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
exports.allPatientsSchema = zod_1.z.object({ allPatients: zod_1.z.literal(true) }).strict();
|
|
8
|
+
exports.subsetPatientIdsSchema = zod_1.z.object({ patientIds: exports.patientIdsSchema }).strict();
|
|
9
|
+
exports.allOrSubsetPatientIdsSchema = zod_1.z.union([exports.allPatientsSchema, exports.subsetPatientIdsSchema]);
|
|
10
|
+
function strictlyValidateAllAndPatientIds({ patientIds, allPatients, }) {
|
|
11
|
+
exports.allOrSubsetPatientIdsSchema.parse({
|
|
12
|
+
...(patientIds ? { patientIds } : {}),
|
|
13
|
+
...(allPatients ? { allPatients } : {}),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.strictlyValidateAllAndPatientIds = strictlyValidateAllAndPatientIds;
|
|
11
17
|
//# sourceMappingURL=patient-or-all.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient-or-all.js","sourceRoot":"","sources":["../../src/domain/patient-or-all.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEpB,QAAA,gBAAgB,GAAG,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAEnE,QAAA,
|
|
1
|
+
{"version":3,"file":"patient-or-all.js","sourceRoot":"","sources":["../../src/domain/patient-or-all.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEpB,QAAA,gBAAgB,GAAG,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAEnE,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACxE,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,wBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAC7E,QAAA,2BAA2B,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,yBAAiB,EAAE,8BAAsB,CAAC,CAAC,CAAC;AAEhG,SAAgB,gCAAgC,CAAC,EAC/C,UAAU,EACV,WAAW,GAIZ;IACC,mCAA2B,CAAC,KAAK,CAAC;QAChC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC,CAAC;AACL,CAAC;AAXD,4EAWC"}
|
package/dist/domain/patient.d.ts
CHANGED
|
@@ -27,7 +27,16 @@ export declare const patientSchema: z.ZodObject<{
|
|
|
27
27
|
addressLine2?: string | undefined;
|
|
28
28
|
city?: string | undefined;
|
|
29
29
|
}>, "many">;
|
|
30
|
-
|
|
30
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
32
|
+
email: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
phone?: string | undefined;
|
|
35
|
+
email?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
phone?: string | undefined;
|
|
38
|
+
email?: string | undefined;
|
|
39
|
+
}>, "many">>;
|
|
31
40
|
}, "strip", z.ZodTypeAny, {
|
|
32
41
|
address: {
|
|
33
42
|
zip: string;
|
|
@@ -43,8 +52,11 @@ export declare const patientSchema: z.ZodObject<{
|
|
|
43
52
|
dob: string;
|
|
44
53
|
genderAtBirth: "M" | "F" | "O" | "U";
|
|
45
54
|
dateCreated: string;
|
|
55
|
+
contact?: {
|
|
56
|
+
phone?: string | undefined;
|
|
57
|
+
email?: string | undefined;
|
|
58
|
+
}[] | undefined;
|
|
46
59
|
externalId?: string | null | undefined;
|
|
47
|
-
phoneNumber?: string | undefined;
|
|
48
60
|
}, {
|
|
49
61
|
address: {
|
|
50
62
|
zip: string;
|
|
@@ -60,8 +72,11 @@ export declare const patientSchema: z.ZodObject<{
|
|
|
60
72
|
dob: string;
|
|
61
73
|
genderAtBirth: "M" | "F" | "O" | "U";
|
|
62
74
|
dateCreated: string;
|
|
75
|
+
contact?: {
|
|
76
|
+
phone?: string | undefined;
|
|
77
|
+
email?: string | undefined;
|
|
78
|
+
}[] | undefined;
|
|
63
79
|
externalId?: string | null | undefined;
|
|
64
|
-
phoneNumber?: string | undefined;
|
|
65
80
|
}>;
|
|
66
81
|
export type Patient = z.infer<typeof patientSchema>;
|
|
67
82
|
export declare const patientIdsSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../src/domain/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../src/domain/patient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/domain/patient.js
CHANGED
|
@@ -18,7 +18,13 @@ exports.patientSchema = zod_1.z.object({
|
|
|
18
18
|
state: zod_1.z.string().optional(),
|
|
19
19
|
zip: zod_1.z.string(),
|
|
20
20
|
})),
|
|
21
|
-
|
|
21
|
+
contact: zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
phone: zod_1.z.string().optional(),
|
|
24
|
+
email: zod_1.z.string().optional(),
|
|
25
|
+
})
|
|
26
|
+
.array()
|
|
27
|
+
.optional(),
|
|
22
28
|
});
|
|
23
29
|
exports.patientIdsSchema = zod_1.z.object({
|
|
24
30
|
patientIds: zod_1.z.array(zod_1.z.string()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient.js","sourceRoot":"","sources":["../../src/domain/patient.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAChC,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,OAAC,CAAC,KAAK,CACd,OAAC,CAAC,MAAM,CAAC;QACP,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;KAChB,CAAC,CACH;IACD,
|
|
1
|
+
{"version":3,"file":"patient.js","sourceRoot":"","sources":["../../src/domain/patient.ts"],"names":[],"mappings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;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateRosterCmd, GetRosterCmd, ListRostersCmd } from "./roster";
|
|
2
|
+
export type PatientRoster = {
|
|
3
|
+
id: string;
|
|
4
|
+
patientId: string;
|
|
5
|
+
rosterId: string;
|
|
6
|
+
};
|
|
7
|
+
export type AssignOrRemovePatientsToRosterCmd = Pick<GetRosterCmd, "rosterId" | "cxId"> & {
|
|
8
|
+
patientIds?: string[];
|
|
9
|
+
allPatients?: boolean;
|
|
10
|
+
overrideClose?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type AssignPatientsAndCreateRosterCmd = Omit<AssignOrRemovePatientsToRosterCmd, "rosterId"> & Omit<CreateRosterCmd, "cxId" | "status">;
|
|
13
|
+
export type ListRostersForPatientCmd = ListRostersCmd & {
|
|
14
|
+
patientId: string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=patient-roster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patient-roster.d.ts","sourceRoot":"","sources":["../../../src/domain/roster/patient-roster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IACxF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,iCAAiC,EAAE,UAAU,CAAC,GAChG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE3C,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patient-roster.js","sourceRoot":"","sources":["../../../src/domain/roster/patient-roster.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const rosterStatus: readonly ["open", "closed"];
|
|
2
|
+
export type RosterStatus = (typeof rosterStatus)[number];
|
|
3
|
+
export declare function isValidRosterStatus(status: string): status is RosterStatus;
|
|
4
|
+
export declare const rosterInitialStatus: RosterStatus;
|
|
5
|
+
export declare function isRosterOpen(status: RosterStatus): boolean;
|
|
6
|
+
export declare function isRosterClosed(status: RosterStatus): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Validates that a new status is valid based on the current status.
|
|
9
|
+
*
|
|
10
|
+
* @param currentStatus - The current status of the roster.
|
|
11
|
+
* @param newStatus - The new status to validate.
|
|
12
|
+
* @returns The validated new status.
|
|
13
|
+
* @throws BadRequestError if the new status is not valid.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateNewRosterStatus(currentStatus: RosterStatus, newStatus: RosterStatus): RosterStatus;
|
|
16
|
+
//# sourceMappingURL=roster-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roster-status.d.ts","sourceRoot":"","sources":["../../../src/domain/roster/roster-status.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6BAA8B,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY,CAE1E;AAED,eAAO,MAAM,mBAAmB,EAAE,YAAqB,CAAC;AAExD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE1D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,YAAY,EAC3B,SAAS,EAAE,YAAY,GACtB,YAAY,CA4Bd"}
|