@openfn/language-fhir-eswatini 0.7.8 → 0.8.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/index.cjs +28 -0
- package/dist/index.js +28 -0
- package/package.json +9 -7
- package/types/builders.d.ts +5 -1
package/dist/index.cjs
CHANGED
|
@@ -94,6 +94,7 @@ __export(builders_exports, {
|
|
|
94
94
|
concept: () => concept,
|
|
95
95
|
condition: () => condition,
|
|
96
96
|
encounter: () => encounter,
|
|
97
|
+
ensureConceptText: () => ensureConceptText,
|
|
97
98
|
episodeOfCare: () => episodeOfCare,
|
|
98
99
|
ext: () => ext,
|
|
99
100
|
extendSystemMap: () => extendSystemMap,
|
|
@@ -2054,6 +2055,32 @@ function SzPatient_default(props) {
|
|
|
2054
2055
|
resource.name.push(_name);
|
|
2055
2056
|
}
|
|
2056
2057
|
}
|
|
2058
|
+
{
|
|
2059
|
+
if (!import_lodash15.default.isNil(props._birthDate)) {
|
|
2060
|
+
if (import_lodash15.default.isPlainObject(props._birthDate)) {
|
|
2061
|
+
resource._birthDate = Object.assign({}, props._birthDate);
|
|
2062
|
+
} else {
|
|
2063
|
+
delete resource._birthDate;
|
|
2064
|
+
resource._birthDate = {};
|
|
2065
|
+
import_language_fhir_416.b.addExtension(
|
|
2066
|
+
resource._birthDate,
|
|
2067
|
+
"http://hl7.org/fhir/StructureDefinition/patient-birthTime",
|
|
2068
|
+
props._birthDate
|
|
2069
|
+
);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
if (!import_lodash15.default.isNil(props._birthTime)) {
|
|
2073
|
+
delete resource._birthTime;
|
|
2074
|
+
if (!resource._birthDate) {
|
|
2075
|
+
resource._birthDate = {};
|
|
2076
|
+
}
|
|
2077
|
+
import_language_fhir_416.b.addExtension(
|
|
2078
|
+
resource._birthDate,
|
|
2079
|
+
"http://hl7.org/fhir/StructureDefinition/patient-birthTime",
|
|
2080
|
+
props._birthTime
|
|
2081
|
+
);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2057
2084
|
if (!import_lodash15.default.isNil(props.deceased)) {
|
|
2058
2085
|
delete resource.deceased;
|
|
2059
2086
|
import_language_fhir_416.b.composite(resource, "deceased", props.deceased);
|
|
@@ -2816,6 +2843,7 @@ var {
|
|
|
2816
2843
|
coding,
|
|
2817
2844
|
composite,
|
|
2818
2845
|
concept,
|
|
2846
|
+
ensureConceptText,
|
|
2819
2847
|
ext,
|
|
2820
2848
|
extendSystemMap,
|
|
2821
2849
|
extendValues,
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(builders_exports, {
|
|
|
44
44
|
concept: () => concept,
|
|
45
45
|
condition: () => condition,
|
|
46
46
|
encounter: () => encounter,
|
|
47
|
+
ensureConceptText: () => ensureConceptText,
|
|
47
48
|
episodeOfCare: () => episodeOfCare,
|
|
48
49
|
ext: () => ext,
|
|
49
50
|
extendSystemMap: () => extendSystemMap,
|
|
@@ -2004,6 +2005,32 @@ function SzPatient_default(props) {
|
|
|
2004
2005
|
resource.name.push(_name);
|
|
2005
2006
|
}
|
|
2006
2007
|
}
|
|
2008
|
+
{
|
|
2009
|
+
if (!_15.isNil(props._birthDate)) {
|
|
2010
|
+
if (_15.isPlainObject(props._birthDate)) {
|
|
2011
|
+
resource._birthDate = Object.assign({}, props._birthDate);
|
|
2012
|
+
} else {
|
|
2013
|
+
delete resource._birthDate;
|
|
2014
|
+
resource._birthDate = {};
|
|
2015
|
+
dt15.addExtension(
|
|
2016
|
+
resource._birthDate,
|
|
2017
|
+
"http://hl7.org/fhir/StructureDefinition/patient-birthTime",
|
|
2018
|
+
props._birthDate
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
if (!_15.isNil(props._birthTime)) {
|
|
2023
|
+
delete resource._birthTime;
|
|
2024
|
+
if (!resource._birthDate) {
|
|
2025
|
+
resource._birthDate = {};
|
|
2026
|
+
}
|
|
2027
|
+
dt15.addExtension(
|
|
2028
|
+
resource._birthDate,
|
|
2029
|
+
"http://hl7.org/fhir/StructureDefinition/patient-birthTime",
|
|
2030
|
+
props._birthTime
|
|
2031
|
+
);
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2007
2034
|
if (!_15.isNil(props.deceased)) {
|
|
2008
2035
|
delete resource.deceased;
|
|
2009
2036
|
dt15.composite(resource, "deceased", props.deceased);
|
|
@@ -2766,6 +2793,7 @@ var {
|
|
|
2766
2793
|
coding,
|
|
2767
2794
|
composite,
|
|
2768
2795
|
concept,
|
|
2796
|
+
ensureConceptText,
|
|
2769
2797
|
ext,
|
|
2770
2798
|
extendSystemMap,
|
|
2771
2799
|
extendValues,
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-fhir-eswatini",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "OpenFn fhir-eswatini adaptor",
|
|
5
5
|
"author": "Open Function Group",
|
|
6
6
|
"license": "LGPLv3",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"fhir": {
|
|
9
9
|
"specUrl": "http://172.209.216.154/definitions.json.zip",
|
|
10
|
-
"adaptorGeneratedDate": "2026-
|
|
11
|
-
"generatorVersion": "0.
|
|
12
|
-
"options": {
|
|
10
|
+
"adaptorGeneratedDate": "2026-06-30T11:22:16.070Z",
|
|
11
|
+
"generatorVersion": "0.8.0",
|
|
12
|
+
"options": {
|
|
13
|
+
"base": "fhir-4"
|
|
14
|
+
}
|
|
13
15
|
},
|
|
14
16
|
"dependencies": {
|
|
15
|
-
"@openfn/language-
|
|
16
|
-
"@openfn/language-
|
|
17
|
+
"@openfn/language-common": "3.3.4",
|
|
18
|
+
"@openfn/language-fhir-4": "0.5.5"
|
|
17
19
|
},
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"assertion-error": "2.0.0",
|
|
@@ -23,7 +25,7 @@
|
|
|
23
25
|
"rimraf": "3.0.2",
|
|
24
26
|
"ts-node": "^10.9.1",
|
|
25
27
|
"typescript": "4.8.4",
|
|
26
|
-
"undici": "^7.
|
|
28
|
+
"undici": "^7.28.0"
|
|
27
29
|
},
|
|
28
30
|
"repository": {
|
|
29
31
|
"type": "git",
|
package/types/builders.d.ts
CHANGED
|
@@ -461,6 +461,8 @@ declare type Organization_SzOrganization_Props = {
|
|
|
461
461
|
};
|
|
462
462
|
|
|
463
463
|
declare type Patient_SzPatient_Props = {
|
|
464
|
+
_birthDate?: any;
|
|
465
|
+
_birthTime?: any;
|
|
464
466
|
active?: boolean;
|
|
465
467
|
address?: builders.Address[];
|
|
466
468
|
birthDate?: string;
|
|
@@ -676,6 +678,7 @@ declare const cc: (codings: (builders.Coding | [string, string, Omit<builders.Co
|
|
|
676
678
|
declare const coding: typeof builders.coding;
|
|
677
679
|
declare const composite: (object: any, key: any, value: any) => void;
|
|
678
680
|
declare const concept: (codings: (builders.Coding | [string, string, Omit<builders.Coding, "system" | "code">?]) | (builders.Coding | [string, string, Omit<builders.Coding, "system" | "code">?])[], extra?: Omit<builders.CodeableConcept, "coding">) => builders.CodeableConcept;
|
|
681
|
+
declare const ensureConceptText: (concept: any) => void;
|
|
679
682
|
declare const ext: (url: string, value: any, props?: Omit<builders.Extension, "url">) => {
|
|
680
683
|
extension: ({
|
|
681
684
|
url: string;
|
|
@@ -1058,6 +1061,7 @@ declare function organization(props: Organization_SzOrganization_Props): any;
|
|
|
1058
1061
|
* @public
|
|
1059
1062
|
* @function
|
|
1060
1063
|
* @param {object} props - Properties to apply to the resource (includes common and custom properties).
|
|
1064
|
+
* @param {} [props._birthDate] - undefined
|
|
1061
1065
|
* @param {boolean} [props.active] - Whether this patient's record is in active use
|
|
1062
1066
|
* @param {Address} [props.address] - An address for the individual
|
|
1063
1067
|
* @param {date} [props.birthDate] - Date of birth: YYYY-MM-DD
|
|
@@ -1239,5 +1243,5 @@ declare function serviceRequest(type: "SzReferral", props: ServiceRequest_SzRefe
|
|
|
1239
1243
|
declare function specimen(type: "SzLabSpecimen", props: Specimen_SzLabSpecimen_Props): any;
|
|
1240
1244
|
declare function specimen(props: Specimen_SzLabSpecimen_Props): any;
|
|
1241
1245
|
|
|
1242
|
-
export { addExtension, appointment, c, cc, coding, composite, concept, condition, encounter, episodeOfCare, ext, extendSystemMap, extendValues, extension, findExtension, id, identifier, location, lookupValue, mapSystems, mapValues, medication, medicationDispense, medicationRequest, observation, organization, patient, practitioner, procedure, ref, reference, serviceRequest, setSystemMap, setValues, specimen, value };
|
|
1246
|
+
export { addExtension, appointment, c, cc, coding, composite, concept, condition, encounter, ensureConceptText, episodeOfCare, ext, extendSystemMap, extendValues, extension, findExtension, id, identifier, location, lookupValue, mapSystems, mapValues, medication, medicationDispense, medicationRequest, observation, organization, patient, practitioner, procedure, ref, reference, serviceRequest, setSystemMap, setValues, specimen, value };
|
|
1243
1247
|
|