@metriport/fhir-sdk 1.6.2 → 1.6.3
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/__tests__/careplan.test.js +24 -22
- package/dist/__tests__/careplan.test.js.map +1 -1
- package/dist/__tests__/clinical-dates.test.js +25 -23
- package/dist/__tests__/clinical-dates.test.js.map +1 -1
- package/dist/__tests__/coding-utilities.test.js +9 -7
- package/dist/__tests__/coding-utilities.test.js.map +1 -1
- package/dist/__tests__/date-range-performance.test.js +4 -2
- package/dist/__tests__/date-range-performance.test.js.map +1 -1
- package/dist/__tests__/date-range-search.test.js +15 -13
- package/dist/__tests__/date-range-search.test.js.map +1 -1
- package/dist/__tests__/env-setup.js +32 -4
- package/dist/__tests__/env-setup.js.map +1 -1
- package/dist/__tests__/fhir-bundle-sdk-basic.test.js +6 -4
- package/dist/__tests__/fhir-bundle-sdk-basic.test.js.map +1 -1
- package/dist/__tests__/fhir-bundle-sdk.test.js +87 -85
- package/dist/__tests__/fhir-bundle-sdk.test.js.map +1 -1
- package/dist/__tests__/fixtures/fhir-bundles.d.ts +1 -1
- package/dist/__tests__/fixtures/fhir-bundles.d.ts.map +1 -1
- package/dist/__tests__/fixtures/fhir-bundles.js +17 -11
- package/dist/__tests__/fixtures/fhir-bundles.js.map +1 -1
- package/dist/__tests__/phase1-verification.test.js +12 -10
- package/dist/__tests__/phase1-verification.test.js.map +1 -1
- package/dist/__tests__/phase2-verification.test.js +16 -14
- package/dist/__tests__/phase2-verification.test.js.map +1 -1
- package/dist/__tests__/phase3-verification.test.js +17 -15
- package/dist/__tests__/phase3-verification.test.js.map +1 -1
- package/dist/__tests__/phase4-verification.test.js +29 -27
- package/dist/__tests__/phase4-verification.test.js.map +1 -1
- package/dist/__tests__/phase5-verification.test.js +40 -38
- package/dist/__tests__/phase5-verification.test.js.map +1 -1
- package/dist/__tests__/reverse-references.test.js +31 -29
- package/dist/__tests__/reverse-references.test.js.map +1 -1
- package/dist/__tests__/type-guards.test.js +54 -132
- package/dist/__tests__/type-guards.test.js.map +1 -1
- package/dist/clinical-dates.js +5 -1
- package/dist/clinical-dates.js.map +1 -1
- package/dist/fhir-bundle-sdk.js +38 -34
- package/dist/fhir-bundle-sdk.js.map +1 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/bundle-operations.js +9 -3
- package/dist/internal/bundle-operations.js.map +1 -1
- package/dist/internal/coding-systems.d.ts +12 -12
- package/dist/internal/coding-systems.js +18 -15
- package/dist/internal/coding-systems.js.map +1 -1
- package/dist/internal/coding-utilities.js +23 -15
- package/dist/internal/coding-utilities.js.map +1 -1
- package/dist/internal/date-extraction.js +7 -2
- package/dist/internal/date-extraction.js.map +1 -1
- package/dist/internal/graph-traversal.js +7 -3
- package/dist/internal/graph-traversal.js.map +1 -1
- package/dist/internal/indexing.js +15 -9
- package/dist/internal/indexing.js.map +1 -1
- package/dist/internal/llm-context.js +17 -8
- package/dist/internal/llm-context.js.map +1 -1
- package/dist/internal/reference-resolution.js +32 -25
- package/dist/internal/reference-resolution.js.map +1 -1
- package/dist/internal/reference-utils.js +11 -4
- package/dist/internal/reference-utils.js.map +1 -1
- package/dist/internal/transparent-proxy.js +14 -10
- package/dist/internal/transparent-proxy.js.map +1 -1
- package/dist/internal/validation.js +8 -4
- package/dist/internal/validation.js.map +1 -1
- package/dist/type-guards.d.ts +134 -105
- package/dist/type-guards.d.ts.map +1 -1
- package/dist/type-guards.js +322 -26
- package/dist/type-guards.js.map +1 -1
- package/dist/types/coding-fields.js +2 -1
- package/dist/types/sdk-types.js +5 -1
- package/dist/types/sdk-types.js.map +1 -1
- package/dist/types/smart-resources.js +10 -5
- package/dist/types/smart-resources.js.map +1 -1
- package/dist/utils/interval-tree/index.js +19 -10
- package/dist/utils/interval-tree/index.js.map +1 -1
- package/dist/utils/interval-tree/shallowequal/arrays.js +4 -1
- package/dist/utils/interval-tree/shallowequal/arrays.js.map +1 -1
- package/dist/utils/interval-tree/shallowequal/index.js +13 -5
- package/dist/utils/interval-tree/shallowequal/index.js.map +1 -1
- package/dist/utils/interval-tree/shallowequal/objects.js +4 -1
- package/dist/utils/interval-tree/shallowequal/objects.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lookForBrokenReferences = void 0;
|
|
4
|
+
const reference_utils_1 = require("./reference-utils");
|
|
2
5
|
/**
|
|
3
6
|
* Validate all references in the bundle
|
|
4
7
|
* FR-2.1: Validate all references in the bundle
|
|
@@ -11,7 +14,7 @@ import { findAllReferences, canResolveReference } from "./reference-utils";
|
|
|
11
14
|
* @param resourcesByFullUrl - Map of resources indexed by entry.fullUrl
|
|
12
15
|
* @returns ValidationResult with broken reference details
|
|
13
16
|
*/
|
|
14
|
-
|
|
17
|
+
function lookForBrokenReferences(bundle, resourcesById, resourcesByFullUrl) {
|
|
15
18
|
const brokenReferences = [];
|
|
16
19
|
if (!bundle.entry) {
|
|
17
20
|
return { hasBrokenReferences: false, brokenReferences: [] };
|
|
@@ -21,9 +24,9 @@ export function lookForBrokenReferences(bundle, resourcesById, resourcesByFullUr
|
|
|
21
24
|
continue;
|
|
22
25
|
}
|
|
23
26
|
const resource = entry.resource;
|
|
24
|
-
const resourceReferences = findAllReferences(resource);
|
|
27
|
+
const resourceReferences = (0, reference_utils_1.findAllReferences)(resource);
|
|
25
28
|
for (const { field, reference } of resourceReferences) {
|
|
26
|
-
if (!canResolveReference(reference, resourcesById, resourcesByFullUrl)) {
|
|
29
|
+
if (!(0, reference_utils_1.canResolveReference)(reference, resourcesById, resourcesByFullUrl)) {
|
|
27
30
|
brokenReferences.push({
|
|
28
31
|
sourceResourceId: resource.id || entry.fullUrl || "unknown",
|
|
29
32
|
sourceResourceType: resource.resourceType,
|
|
@@ -38,4 +41,5 @@ export function lookForBrokenReferences(bundle, resourcesById, resourcesByFullUr
|
|
|
38
41
|
brokenReferences: brokenReferences,
|
|
39
42
|
};
|
|
40
43
|
}
|
|
44
|
+
exports.lookForBrokenReferences = lookForBrokenReferences;
|
|
41
45
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/internal/validation.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/internal/validation.ts"],"names":[],"mappings":";;;AAEA,uDAA2E;AAE3E;;;;;;;;;;;GAWG;AACH,SAAgB,uBAAuB,CACrC,MAAc,EACd,aAAoC,EACpC,kBAAyC;IAEzC,MAAM,gBAAgB,GAAsB,EAAE,CAAC;IAE/C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACjB,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;KAC7D;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE;QAChC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACnB,SAAS;SACV;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChC,MAAM,kBAAkB,GAAG,IAAA,mCAAiB,EAAC,QAAQ,CAAC,CAAC;QAEvD,KAAK,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,kBAAkB,EAAE;YACrD,IAAI,CAAC,IAAA,qCAAmB,EAAC,SAAS,EAAE,aAAa,EAAE,kBAAkB,CAAC,EAAE;gBACtE,gBAAgB,CAAC,IAAI,CAAC;oBACpB,gBAAgB,EAAE,QAAQ,CAAC,EAAE,IAAI,KAAK,CAAC,OAAO,IAAI,SAAS;oBAC3D,kBAAkB,EAAE,QAAQ,CAAC,YAAY;oBACzC,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,SAAS;iBACrB,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO;QACL,mBAAmB,EAAE,gBAAgB,CAAC,MAAM,GAAG,CAAC;QAChD,gBAAgB,EAAE,gBAAgB;KACnC,CAAC;AACJ,CAAC;AAnCD,0DAmCC"}
|
package/dist/type-guards.d.ts
CHANGED
|
@@ -1,183 +1,212 @@
|
|
|
1
|
-
import { Resource, Patient, Observation, DiagnosticReport, Encounter, Practitioner, PractitionerRole, Organization, Location, AllergyIntolerance, Condition, Composition, Coverage, DocumentReference, FamilyMemberHistory, Immunization, Medication, MedicationAdministration, MedicationDispense, MedicationRequest, MedicationStatement, Procedure, RelatedPerson, RiskAssessment, ServiceRequest, CarePlan, Bundle } from "@medplum/fhirtypes";
|
|
2
|
-
import { Smart } from "./types/smart-resources";
|
|
3
|
-
import { SmartPatient, SmartObservation, SmartDiagnosticReport, SmartEncounter, SmartPractitioner, SmartOrganization, SmartLocation, SmartAllergyIntolerance, SmartCondition, SmartComposition, SmartCoverage, SmartDocumentReference, SmartFamilyMemberHistory, SmartImmunization, SmartMedication, SmartMedicationAdministration, SmartMedicationDispense, SmartMedicationRequest, SmartMedicationStatement, SmartProcedure, SmartRelatedPerson, SmartRiskAssessment, SmartServiceRequest, SmartCarePlan } from "./types/coding-fields";
|
|
1
|
+
import type { Resource, Patient, Observation, DiagnosticReport, Encounter, Practitioner, PractitionerRole, Organization, Location, AllergyIntolerance, Condition, Composition, Coverage, DocumentReference, FamilyMemberHistory, Immunization, Medication, MedicationAdministration, MedicationDispense, MedicationRequest, MedicationStatement, Procedure, RelatedPerson, RiskAssessment, ServiceRequest, CarePlan, Bundle } from "@medplum/fhirtypes";
|
|
2
|
+
import type { Smart } from "./types/smart-resources";
|
|
3
|
+
import type { SmartPatient, SmartObservation, SmartDiagnosticReport, SmartEncounter, SmartPractitioner, SmartPractitionerRole, SmartOrganization, SmartLocation, SmartAllergyIntolerance, SmartCondition, SmartComposition, SmartCoverage, SmartDocumentReference, SmartFamilyMemberHistory, SmartImmunization, SmartMedication, SmartMedicationAdministration, SmartMedicationDispense, SmartMedicationRequest, SmartMedicationStatement, SmartProcedure, SmartRelatedPerson, SmartRiskAssessment, SmartServiceRequest, SmartCarePlan } from "./types/coding-fields";
|
|
4
4
|
/**
|
|
5
|
-
* Patient type guard
|
|
6
|
-
* Returns SmartPatient when used with Smart resources to provide full TypeScript support
|
|
7
|
-
* for coding utilities
|
|
5
|
+
* Patient type guard for Smart resources
|
|
8
6
|
*/
|
|
9
7
|
export declare function isPatient(resource: Smart<Resource> | undefined): resource is SmartPatient;
|
|
10
|
-
export declare function isPatient(resource: Resource | undefined): resource is Patient;
|
|
11
8
|
/**
|
|
12
|
-
* Observation type guard
|
|
13
|
-
* Returns SmartObservation when used with Smart resources to provide full TypeScript support
|
|
14
|
-
* for coding utilities
|
|
9
|
+
* Observation type guard for Smart resources
|
|
15
10
|
*/
|
|
16
11
|
export declare function isObservation(resource: Smart<Resource> | undefined): resource is SmartObservation;
|
|
17
|
-
export declare function isObservation(resource: Resource | undefined): resource is Observation;
|
|
18
12
|
/**
|
|
19
|
-
* DiagnosticReport type guard
|
|
20
|
-
* Returns SmartDiagnosticReport when used with Smart resources to provide full TypeScript support
|
|
21
|
-
* for coding utilities
|
|
13
|
+
* DiagnosticReport type guard for Smart resources
|
|
22
14
|
*/
|
|
23
15
|
export declare function isDiagnosticReport(resource: Smart<Resource> | undefined): resource is SmartDiagnosticReport;
|
|
24
|
-
export declare function isDiagnosticReport(resource: Resource | undefined): resource is DiagnosticReport;
|
|
25
16
|
/**
|
|
26
|
-
* Encounter type guard
|
|
27
|
-
* Returns SmartEncounter when used with Smart resources to provide full TypeScript support
|
|
28
|
-
* for coding utilities
|
|
17
|
+
* Encounter type guard for Smart resources
|
|
29
18
|
*/
|
|
30
19
|
export declare function isEncounter(resource: Smart<Resource> | undefined): resource is SmartEncounter;
|
|
31
|
-
export declare function isEncounter(resource: Resource | undefined): resource is Encounter;
|
|
32
20
|
/**
|
|
33
|
-
* Practitioner type guard
|
|
34
|
-
* Returns SmartPractitioner when used with Smart resources to provide full TypeScript support
|
|
35
|
-
* for coding utilities
|
|
21
|
+
* Practitioner type guard for Smart resources
|
|
36
22
|
*/
|
|
37
23
|
export declare function isPractitioner(resource: Smart<Resource> | undefined): resource is SmartPractitioner;
|
|
38
|
-
export declare function isPractitioner(resource: Resource | undefined): resource is Practitioner;
|
|
39
24
|
/**
|
|
40
|
-
* PractitionerRole type guard
|
|
41
|
-
* Note: PractitionerRole doesn't have specific coding fields, so it uses the generic Smart type
|
|
25
|
+
* PractitionerRole type guard for Smart resources
|
|
42
26
|
*/
|
|
43
|
-
export declare function isPractitionerRole(resource: Smart<Resource> | undefined): resource is
|
|
44
|
-
export declare function isPractitionerRole(resource: Resource | undefined): resource is PractitionerRole;
|
|
27
|
+
export declare function isPractitionerRole(resource: Smart<Resource> | undefined): resource is SmartPractitionerRole;
|
|
45
28
|
/**
|
|
46
|
-
* Organization type guard
|
|
47
|
-
* Returns SmartOrganization when used with Smart resources to provide full TypeScript support
|
|
48
|
-
* for coding utilities
|
|
29
|
+
* Organization type guard for Smart resources
|
|
49
30
|
*/
|
|
50
31
|
export declare function isOrganization(resource: Smart<Resource> | undefined): resource is SmartOrganization;
|
|
51
|
-
export declare function isOrganization(resource: Resource | undefined): resource is Organization;
|
|
52
32
|
/**
|
|
53
|
-
* Location type guard
|
|
54
|
-
* Returns SmartLocation when used with Smart resources to provide full TypeScript support
|
|
55
|
-
* for coding utilities
|
|
33
|
+
* Location type guard for Smart resources
|
|
56
34
|
*/
|
|
57
35
|
export declare function isLocation(resource: Smart<Resource> | undefined): resource is SmartLocation;
|
|
58
|
-
export declare function isLocation(resource: Resource | undefined): resource is Location;
|
|
59
36
|
/**
|
|
60
|
-
* AllergyIntolerance type guard
|
|
61
|
-
* Returns SmartAllergyIntolerance when used with Smart resources to provide full TypeScript support
|
|
62
|
-
* for coding utilities
|
|
37
|
+
* AllergyIntolerance type guard for Smart resources
|
|
63
38
|
*/
|
|
64
39
|
export declare function isAllergyIntolerance(resource: Smart<Resource> | undefined): resource is SmartAllergyIntolerance;
|
|
65
|
-
export declare function isAllergyIntolerance(resource: Resource | undefined): resource is AllergyIntolerance;
|
|
66
40
|
/**
|
|
67
|
-
* Condition type guard
|
|
68
|
-
* Returns SmartCondition when used with Smart resources to provide full TypeScript support
|
|
69
|
-
* for coding utilities
|
|
41
|
+
* Condition type guard for Smart resources
|
|
70
42
|
*/
|
|
71
43
|
export declare function isCondition(resource: Smart<Resource> | undefined): resource is SmartCondition;
|
|
72
|
-
export declare function isCondition(resource: Resource | undefined): resource is Condition;
|
|
73
44
|
/**
|
|
74
|
-
* Composition type guard
|
|
75
|
-
* Returns SmartComposition when used with Smart resources to provide full TypeScript support
|
|
76
|
-
* for coding utilities
|
|
45
|
+
* Composition type guard for Smart resources
|
|
77
46
|
*/
|
|
78
47
|
export declare function isComposition(resource: Smart<Resource> | undefined): resource is SmartComposition;
|
|
79
|
-
export declare function isComposition(resource: Resource | undefined): resource is Composition;
|
|
80
48
|
/**
|
|
81
|
-
* Coverage type guard
|
|
82
|
-
* Returns SmartCoverage when used with Smart resources to provide full TypeScript support
|
|
83
|
-
* for coding utilities
|
|
49
|
+
* Coverage type guard for Smart resources
|
|
84
50
|
*/
|
|
85
51
|
export declare function isCoverage(resource: Smart<Resource> | undefined): resource is SmartCoverage;
|
|
86
|
-
export declare function isCoverage(resource: Resource | undefined): resource is Coverage;
|
|
87
52
|
/**
|
|
88
|
-
* DocumentReference type guard
|
|
89
|
-
* Returns SmartDocumentReference when used with Smart resources to provide full TypeScript support
|
|
90
|
-
* for coding utilities
|
|
53
|
+
* DocumentReference type guard for Smart resources
|
|
91
54
|
*/
|
|
92
55
|
export declare function isDocumentReference(resource: Smart<Resource> | undefined): resource is SmartDocumentReference;
|
|
93
|
-
export declare function isDocumentReference(resource: Resource | undefined): resource is DocumentReference;
|
|
94
56
|
/**
|
|
95
|
-
* FamilyMemberHistory type guard
|
|
96
|
-
* Returns SmartFamilyMemberHistory when used with Smart resources to provide full TypeScript support
|
|
97
|
-
* for coding utilities
|
|
57
|
+
* FamilyMemberHistory type guard for Smart resources
|
|
98
58
|
*/
|
|
99
59
|
export declare function isFamilyMemberHistory(resource: Smart<Resource> | undefined): resource is SmartFamilyMemberHistory;
|
|
100
|
-
export declare function isFamilyMemberHistory(resource: Resource | undefined): resource is FamilyMemberHistory;
|
|
101
60
|
/**
|
|
102
|
-
* Immunization type guard
|
|
103
|
-
* Returns SmartImmunization when used with Smart resources to provide full TypeScript support
|
|
104
|
-
* for coding utilities
|
|
61
|
+
* Immunization type guard for Smart resources
|
|
105
62
|
*/
|
|
106
63
|
export declare function isImmunization(resource: Smart<Resource> | undefined): resource is SmartImmunization;
|
|
107
|
-
export declare function isImmunization(resource: Resource | undefined): resource is Immunization;
|
|
108
64
|
/**
|
|
109
|
-
* Medication type guard
|
|
110
|
-
* Returns SmartMedication when used with Smart resources to provide full TypeScript support
|
|
111
|
-
* for coding utilities
|
|
65
|
+
* Medication type guard for Smart resources
|
|
112
66
|
*/
|
|
113
67
|
export declare function isMedication(resource: Smart<Resource> | undefined): resource is SmartMedication;
|
|
114
|
-
export declare function isMedication(resource: Resource | undefined): resource is Medication;
|
|
115
68
|
/**
|
|
116
|
-
* MedicationAdministration type guard
|
|
117
|
-
* Returns SmartMedicationAdministration when used with Smart resources to provide full TypeScript support
|
|
118
|
-
* for coding utilities
|
|
69
|
+
* MedicationAdministration type guard for Smart resources
|
|
119
70
|
*/
|
|
120
71
|
export declare function isMedicationAdministration(resource: Smart<Resource> | undefined): resource is SmartMedicationAdministration;
|
|
121
|
-
export declare function isMedicationAdministration(resource: Resource | undefined): resource is MedicationAdministration;
|
|
122
72
|
/**
|
|
123
|
-
* MedicationDispense type guard
|
|
124
|
-
* Returns SmartMedicationDispense when used with Smart resources to provide full TypeScript support
|
|
125
|
-
* for coding utilities
|
|
73
|
+
* MedicationDispense type guard for Smart resources
|
|
126
74
|
*/
|
|
127
75
|
export declare function isMedicationDispense(resource: Smart<Resource> | undefined): resource is SmartMedicationDispense;
|
|
128
|
-
export declare function isMedicationDispense(resource: Resource | undefined): resource is MedicationDispense;
|
|
129
76
|
/**
|
|
130
|
-
* MedicationRequest type guard
|
|
131
|
-
* Returns SmartMedicationRequest when used with Smart resources to provide full TypeScript support
|
|
132
|
-
* for coding utilities
|
|
77
|
+
* MedicationRequest type guard for Smart resources
|
|
133
78
|
*/
|
|
134
79
|
export declare function isMedicationRequest(resource: Smart<Resource> | undefined): resource is SmartMedicationRequest;
|
|
135
|
-
export declare function isMedicationRequest(resource: Resource | undefined): resource is MedicationRequest;
|
|
136
80
|
/**
|
|
137
|
-
* MedicationStatement type guard
|
|
138
|
-
* Returns SmartMedicationStatement when used with Smart resources to provide full TypeScript support
|
|
139
|
-
* for coding utilities
|
|
81
|
+
* MedicationStatement type guard for Smart resources
|
|
140
82
|
*/
|
|
141
83
|
export declare function isMedicationStatement(resource: Smart<Resource> | undefined): resource is SmartMedicationStatement;
|
|
142
|
-
export declare function isMedicationStatement(resource: Resource | undefined): resource is MedicationStatement;
|
|
143
84
|
/**
|
|
144
|
-
* Procedure type guard
|
|
145
|
-
* Returns SmartProcedure when used with Smart resources to provide full TypeScript support
|
|
146
|
-
* for coding utilities
|
|
85
|
+
* Procedure type guard for Smart resources
|
|
147
86
|
*/
|
|
148
87
|
export declare function isProcedure(resource: Smart<Resource> | undefined): resource is SmartProcedure;
|
|
149
|
-
export declare function isProcedure(resource: Resource | undefined): resource is Procedure;
|
|
150
88
|
/**
|
|
151
|
-
* RelatedPerson type guard
|
|
152
|
-
* Returns SmartRelatedPerson when used with Smart resources to provide full TypeScript support
|
|
153
|
-
* for coding utilities
|
|
89
|
+
* RelatedPerson type guard for Smart resources
|
|
154
90
|
*/
|
|
155
91
|
export declare function isRelatedPerson(resource: Smart<Resource> | undefined): resource is SmartRelatedPerson;
|
|
156
|
-
export declare function isRelatedPerson(resource: Resource | undefined): resource is RelatedPerson;
|
|
157
92
|
/**
|
|
158
|
-
* RiskAssessment type guard
|
|
159
|
-
* Returns SmartRiskAssessment when used with Smart resources to provide full TypeScript support
|
|
160
|
-
* for coding utilities
|
|
93
|
+
* RiskAssessment type guard for Smart resources
|
|
161
94
|
*/
|
|
162
95
|
export declare function isRiskAssessment(resource: Smart<Resource> | undefined): resource is SmartRiskAssessment;
|
|
163
|
-
export declare function isRiskAssessment(resource: Resource | undefined): resource is RiskAssessment;
|
|
164
96
|
/**
|
|
165
|
-
* ServiceRequest type guard
|
|
166
|
-
* Returns SmartServiceRequest when used with Smart resources to provide full TypeScript support
|
|
167
|
-
* for coding utilities
|
|
97
|
+
* ServiceRequest type guard for Smart resources
|
|
168
98
|
*/
|
|
169
99
|
export declare function isServiceRequest(resource: Smart<Resource> | undefined): resource is SmartServiceRequest;
|
|
170
|
-
export declare function isServiceRequest(resource: Resource | undefined): resource is ServiceRequest;
|
|
171
100
|
/**
|
|
172
|
-
* CarePlan type guard
|
|
173
|
-
* Returns SmartCarePlan when used with Smart resources to provide full TypeScript support
|
|
174
|
-
* for coding utilities
|
|
101
|
+
* CarePlan type guard for Smart resources
|
|
175
102
|
*/
|
|
176
103
|
export declare function isCarePlan(resource: Smart<Resource> | undefined): resource is SmartCarePlan;
|
|
177
|
-
export declare function isCarePlan(resource: Resource | undefined): resource is CarePlan;
|
|
178
104
|
/**
|
|
179
|
-
* Bundle type guard
|
|
105
|
+
* Bundle type guard for Smart resources
|
|
180
106
|
*/
|
|
181
107
|
export declare function isBundle(resource: Smart<Resource> | undefined): resource is Smart<Bundle>;
|
|
182
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Patient type guard for plain FHIR resources
|
|
110
|
+
*/
|
|
111
|
+
export declare function isPlainPatient(resource: Resource | undefined): resource is Patient;
|
|
112
|
+
/**
|
|
113
|
+
* Observation type guard for plain FHIR resources
|
|
114
|
+
*/
|
|
115
|
+
export declare function isPlainObservation(resource: Resource | undefined): resource is Observation;
|
|
116
|
+
/**
|
|
117
|
+
* DiagnosticReport type guard for plain FHIR resources
|
|
118
|
+
*/
|
|
119
|
+
export declare function isPlainDiagnosticReport(resource: Resource | undefined): resource is DiagnosticReport;
|
|
120
|
+
/**
|
|
121
|
+
* Encounter type guard for plain FHIR resources
|
|
122
|
+
*/
|
|
123
|
+
export declare function isPlainEncounter(resource: Resource | undefined): resource is Encounter;
|
|
124
|
+
/**
|
|
125
|
+
* Practitioner type guard for plain FHIR resources
|
|
126
|
+
*/
|
|
127
|
+
export declare function isPlainPractitioner(resource: Resource | undefined): resource is Practitioner;
|
|
128
|
+
/**
|
|
129
|
+
* PractitionerRole type guard for plain FHIR resources
|
|
130
|
+
*/
|
|
131
|
+
export declare function isPlainPractitionerRole(resource: Resource | undefined): resource is PractitionerRole;
|
|
132
|
+
/**
|
|
133
|
+
* Organization type guard for plain FHIR resources
|
|
134
|
+
*/
|
|
135
|
+
export declare function isPlainOrganization(resource: Resource | undefined): resource is Organization;
|
|
136
|
+
/**
|
|
137
|
+
* Location type guard for plain FHIR resources
|
|
138
|
+
*/
|
|
139
|
+
export declare function isPlainLocation(resource: Resource | undefined): resource is Location;
|
|
140
|
+
/**
|
|
141
|
+
* AllergyIntolerance type guard for plain FHIR resources
|
|
142
|
+
*/
|
|
143
|
+
export declare function isPlainAllergyIntolerance(resource: Resource | undefined): resource is AllergyIntolerance;
|
|
144
|
+
/**
|
|
145
|
+
* Condition type guard for plain FHIR resources
|
|
146
|
+
*/
|
|
147
|
+
export declare function isPlainCondition(resource: Resource | undefined): resource is Condition;
|
|
148
|
+
/**
|
|
149
|
+
* Composition type guard for plain FHIR resources
|
|
150
|
+
*/
|
|
151
|
+
export declare function isPlainComposition(resource: Resource | undefined): resource is Composition;
|
|
152
|
+
/**
|
|
153
|
+
* Coverage type guard for plain FHIR resources
|
|
154
|
+
*/
|
|
155
|
+
export declare function isPlainCoverage(resource: Resource | undefined): resource is Coverage;
|
|
156
|
+
/**
|
|
157
|
+
* DocumentReference type guard for plain FHIR resources
|
|
158
|
+
*/
|
|
159
|
+
export declare function isPlainDocumentReference(resource: Resource | undefined): resource is DocumentReference;
|
|
160
|
+
/**
|
|
161
|
+
* FamilyMemberHistory type guard for plain FHIR resources
|
|
162
|
+
*/
|
|
163
|
+
export declare function isPlainFamilyMemberHistory(resource: Resource | undefined): resource is FamilyMemberHistory;
|
|
164
|
+
/**
|
|
165
|
+
* Immunization type guard for plain FHIR resources
|
|
166
|
+
*/
|
|
167
|
+
export declare function isPlainImmunization(resource: Resource | undefined): resource is Immunization;
|
|
168
|
+
/**
|
|
169
|
+
* Medication type guard for plain FHIR resources
|
|
170
|
+
*/
|
|
171
|
+
export declare function isPlainMedication(resource: Resource | undefined): resource is Medication;
|
|
172
|
+
/**
|
|
173
|
+
* MedicationAdministration type guard for plain FHIR resources
|
|
174
|
+
*/
|
|
175
|
+
export declare function isPlainMedicationAdministration(resource: Resource | undefined): resource is MedicationAdministration;
|
|
176
|
+
/**
|
|
177
|
+
* MedicationDispense type guard for plain FHIR resources
|
|
178
|
+
*/
|
|
179
|
+
export declare function isPlainMedicationDispense(resource: Resource | undefined): resource is MedicationDispense;
|
|
180
|
+
/**
|
|
181
|
+
* MedicationRequest type guard for plain FHIR resources
|
|
182
|
+
*/
|
|
183
|
+
export declare function isPlainMedicationRequest(resource: Resource | undefined): resource is MedicationRequest;
|
|
184
|
+
/**
|
|
185
|
+
* MedicationStatement type guard for plain FHIR resources
|
|
186
|
+
*/
|
|
187
|
+
export declare function isPlainMedicationStatement(resource: Resource | undefined): resource is MedicationStatement;
|
|
188
|
+
/**
|
|
189
|
+
* Procedure type guard for plain FHIR resources
|
|
190
|
+
*/
|
|
191
|
+
export declare function isPlainProcedure(resource: Resource | undefined): resource is Procedure;
|
|
192
|
+
/**
|
|
193
|
+
* RelatedPerson type guard for plain FHIR resources
|
|
194
|
+
*/
|
|
195
|
+
export declare function isPlainRelatedPerson(resource: Resource | undefined): resource is RelatedPerson;
|
|
196
|
+
/**
|
|
197
|
+
* RiskAssessment type guard for plain FHIR resources
|
|
198
|
+
*/
|
|
199
|
+
export declare function isPlainRiskAssessment(resource: Resource | undefined): resource is RiskAssessment;
|
|
200
|
+
/**
|
|
201
|
+
* ServiceRequest type guard for plain FHIR resources
|
|
202
|
+
*/
|
|
203
|
+
export declare function isPlainServiceRequest(resource: Resource | undefined): resource is ServiceRequest;
|
|
204
|
+
/**
|
|
205
|
+
* CarePlan type guard for plain FHIR resources
|
|
206
|
+
*/
|
|
207
|
+
export declare function isPlainCarePlan(resource: Resource | undefined): resource is CarePlan;
|
|
208
|
+
/**
|
|
209
|
+
* Bundle type guard for plain FHIR resources
|
|
210
|
+
*/
|
|
211
|
+
export declare function isPlainBundle(resource: Resource | undefined): resource is Bundle;
|
|
183
212
|
//# sourceMappingURL=type-guards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../src/type-guards.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../src/type-guards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,QAAQ,EACR,MAAM,EACP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EACh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