@openfn/language-fhir-4 0.5.0 → 0.5.2
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 +278 -272
- package/dist/index.js +278 -272
- package/package.json +6 -6
- package/types/typedefs.d.ts +244 -0
- package/types/util.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-fhir-4",
|
|
3
3
|
"label": "FHIR r4",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"description": "OpenFn FHIR r4 adaptor",
|
|
6
6
|
"author": "Open Function Group",
|
|
7
7
|
"license": "LGPLv3",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"fhir": {
|
|
10
10
|
"specUrl": "https://hl7.org/fhir/R4B/definitions.json.zip",
|
|
11
|
-
"adaptorGeneratedDate": "2026-
|
|
12
|
-
"generatorVersion": "0.7.
|
|
11
|
+
"adaptorGeneratedDate": "2026-04-17T08:28:36.946Z",
|
|
12
|
+
"generatorVersion": "0.7.8",
|
|
13
13
|
"options": {
|
|
14
14
|
"simpleBuilders": true
|
|
15
15
|
}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"@swc/core": "^1.10.9",
|
|
19
19
|
"@types/fhir": "^0.0.41",
|
|
20
20
|
"fhir": "^4.12.0",
|
|
21
|
-
"lodash-es": "^4.
|
|
21
|
+
"lodash-es": "^4.18.1",
|
|
22
22
|
"swc-loader": "^0.2.6",
|
|
23
23
|
"tsx": "^4.19.2",
|
|
24
|
-
"@openfn/language-common": "3.3.
|
|
24
|
+
"@openfn/language-common": "3.3.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/mocha": "^10.0.10",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"rimraf": "3.0.2",
|
|
33
33
|
"ts-node": "10.9.1",
|
|
34
34
|
"typescript": "5.9.2",
|
|
35
|
-
"undici": "^7.
|
|
35
|
+
"undici": "^7.24.7"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
type Address = {
|
|
2
|
+
/**
|
|
3
|
+
* - Name of city, town etc.
|
|
4
|
+
*/
|
|
5
|
+
city?: string;
|
|
6
|
+
/**
|
|
7
|
+
* - Country (e.g. can be ISO 3166 2 or 3 letter code)
|
|
8
|
+
*/
|
|
9
|
+
country?: string;
|
|
10
|
+
/**
|
|
11
|
+
* - District name (aka county)
|
|
12
|
+
*/
|
|
13
|
+
district?: string;
|
|
14
|
+
/**
|
|
15
|
+
* - Additional content defined by implementations
|
|
16
|
+
*/
|
|
17
|
+
extension?: Extension[];
|
|
18
|
+
/**
|
|
19
|
+
* - Unique id for inter-element referencing
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* - Street name, number, direction & P.O. Box etc.
|
|
24
|
+
*/
|
|
25
|
+
line?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* - Time period when address was/is in use
|
|
28
|
+
*/
|
|
29
|
+
period?: Period;
|
|
30
|
+
/**
|
|
31
|
+
* - Postal code for area
|
|
32
|
+
*/
|
|
33
|
+
postalCode?: string;
|
|
34
|
+
/**
|
|
35
|
+
* - Sub-unit of country (abbreviations ok)
|
|
36
|
+
*/
|
|
37
|
+
state?: string;
|
|
38
|
+
/**
|
|
39
|
+
* - Text representation of the address
|
|
40
|
+
*/
|
|
41
|
+
text?: string;
|
|
42
|
+
/**
|
|
43
|
+
* - postal | physical | both
|
|
44
|
+
*/
|
|
45
|
+
type?: string;
|
|
46
|
+
/**
|
|
47
|
+
* - home | work | temp | old | billing - purpose of this address
|
|
48
|
+
*/
|
|
49
|
+
use?: string;
|
|
50
|
+
};
|
|
51
|
+
type CodeableConcept = {
|
|
52
|
+
/**
|
|
53
|
+
* - Code defined by a terminology system
|
|
54
|
+
*/
|
|
55
|
+
coding?: Coding[];
|
|
56
|
+
/**
|
|
57
|
+
* - Additional content defined by implementations
|
|
58
|
+
*/
|
|
59
|
+
extension?: Extension[];
|
|
60
|
+
/**
|
|
61
|
+
* - Unique id for inter-element referencing
|
|
62
|
+
*/
|
|
63
|
+
id?: string;
|
|
64
|
+
/**
|
|
65
|
+
* - Plain text representation of the concept
|
|
66
|
+
*/
|
|
67
|
+
text?: string;
|
|
68
|
+
};
|
|
69
|
+
type Coding = {
|
|
70
|
+
/**
|
|
71
|
+
* - Symbol in syntax defined by the system
|
|
72
|
+
*/
|
|
73
|
+
code?: string;
|
|
74
|
+
/**
|
|
75
|
+
* - Representation defined by the system
|
|
76
|
+
*/
|
|
77
|
+
display?: string;
|
|
78
|
+
/**
|
|
79
|
+
* - Additional content defined by implementations
|
|
80
|
+
*/
|
|
81
|
+
extension?: Extension[];
|
|
82
|
+
/**
|
|
83
|
+
* - Unique id for inter-element referencing
|
|
84
|
+
*/
|
|
85
|
+
id?: string;
|
|
86
|
+
/**
|
|
87
|
+
* - Identity of the terminology system
|
|
88
|
+
*/
|
|
89
|
+
system?: string;
|
|
90
|
+
/**
|
|
91
|
+
* - If this coding was chosen directly by the user
|
|
92
|
+
*/
|
|
93
|
+
userSelected?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* - Version of the system - if relevant
|
|
96
|
+
*/
|
|
97
|
+
version?: string;
|
|
98
|
+
};
|
|
99
|
+
type ContactPoint = {
|
|
100
|
+
/**
|
|
101
|
+
* - Additional content defined by implementations
|
|
102
|
+
*/
|
|
103
|
+
extension?: Extension[];
|
|
104
|
+
/**
|
|
105
|
+
* - Unique id for inter-element referencing
|
|
106
|
+
*/
|
|
107
|
+
id?: string;
|
|
108
|
+
/**
|
|
109
|
+
* - Time period when the contact point was/is in use
|
|
110
|
+
*/
|
|
111
|
+
period?: Period;
|
|
112
|
+
/**
|
|
113
|
+
* - Specify preferred order of use (1 = highest)
|
|
114
|
+
*/
|
|
115
|
+
rank?: number;
|
|
116
|
+
/**
|
|
117
|
+
* - phone | fax | email | pager | url | sms | other
|
|
118
|
+
*/
|
|
119
|
+
system?: string;
|
|
120
|
+
/**
|
|
121
|
+
* - home | work | temp | old | mobile - purpose of this contact point
|
|
122
|
+
*/
|
|
123
|
+
use?: string;
|
|
124
|
+
/**
|
|
125
|
+
* - The actual contact point details
|
|
126
|
+
*/
|
|
127
|
+
value?: string;
|
|
128
|
+
};
|
|
129
|
+
type HumanName = {
|
|
130
|
+
/**
|
|
131
|
+
* - Additional content defined by implementations
|
|
132
|
+
*/
|
|
133
|
+
extension?: Extension[];
|
|
134
|
+
/**
|
|
135
|
+
* - Family name (often called 'Surname')
|
|
136
|
+
*/
|
|
137
|
+
family?: string;
|
|
138
|
+
/**
|
|
139
|
+
* - Given names (not always 'first'). Includes middle names
|
|
140
|
+
*/
|
|
141
|
+
given?: string[];
|
|
142
|
+
/**
|
|
143
|
+
* - Unique id for inter-element referencing
|
|
144
|
+
*/
|
|
145
|
+
id?: string;
|
|
146
|
+
/**
|
|
147
|
+
* - Time period when name was/is in use
|
|
148
|
+
*/
|
|
149
|
+
period?: Period;
|
|
150
|
+
/**
|
|
151
|
+
* - Parts that come before the name
|
|
152
|
+
*/
|
|
153
|
+
prefix?: string[];
|
|
154
|
+
/**
|
|
155
|
+
* - Parts that come after the name
|
|
156
|
+
*/
|
|
157
|
+
suffix?: string[];
|
|
158
|
+
/**
|
|
159
|
+
* - Text representation of the full name
|
|
160
|
+
*/
|
|
161
|
+
text?: string;
|
|
162
|
+
/**
|
|
163
|
+
* - usual | official | temp | nickname | anonymous | old | maiden
|
|
164
|
+
*/
|
|
165
|
+
use?: string;
|
|
166
|
+
};
|
|
167
|
+
type Identifier = {
|
|
168
|
+
/**
|
|
169
|
+
* - Organization that issued id (may be just text)
|
|
170
|
+
*/
|
|
171
|
+
assigner?: string | Reference;
|
|
172
|
+
/**
|
|
173
|
+
* - Additional content defined by implementations
|
|
174
|
+
*/
|
|
175
|
+
extension?: Extension[];
|
|
176
|
+
/**
|
|
177
|
+
* - Unique id for inter-element referencing
|
|
178
|
+
*/
|
|
179
|
+
id?: string;
|
|
180
|
+
/**
|
|
181
|
+
* - Time period when id is/was valid for use
|
|
182
|
+
*/
|
|
183
|
+
period?: Period;
|
|
184
|
+
/**
|
|
185
|
+
* - The namespace for the identifier value
|
|
186
|
+
*/
|
|
187
|
+
system?: string;
|
|
188
|
+
/**
|
|
189
|
+
* - Description of identifier
|
|
190
|
+
*/
|
|
191
|
+
type?: string[] | CodeableConcept;
|
|
192
|
+
/**
|
|
193
|
+
* - usual | official | temp | secondary | old (If known)
|
|
194
|
+
*/
|
|
195
|
+
use?: string;
|
|
196
|
+
/**
|
|
197
|
+
* - The value that is unique
|
|
198
|
+
*/
|
|
199
|
+
value?: string;
|
|
200
|
+
};
|
|
201
|
+
type Period = {
|
|
202
|
+
/**
|
|
203
|
+
* - End time with inclusive boundary, if not ongoing
|
|
204
|
+
*/
|
|
205
|
+
end?: string;
|
|
206
|
+
/**
|
|
207
|
+
* - Additional content defined by implementations
|
|
208
|
+
*/
|
|
209
|
+
extension?: Extension[];
|
|
210
|
+
/**
|
|
211
|
+
* - Unique id for inter-element referencing
|
|
212
|
+
*/
|
|
213
|
+
id?: string;
|
|
214
|
+
/**
|
|
215
|
+
* - Starting time with inclusive boundary
|
|
216
|
+
*/
|
|
217
|
+
start?: string;
|
|
218
|
+
};
|
|
219
|
+
type Reference = {
|
|
220
|
+
/**
|
|
221
|
+
* - Text alternative for the resource
|
|
222
|
+
*/
|
|
223
|
+
display?: string;
|
|
224
|
+
/**
|
|
225
|
+
* - Additional content defined by implementations
|
|
226
|
+
*/
|
|
227
|
+
extension?: Extension[];
|
|
228
|
+
/**
|
|
229
|
+
* - Unique id for inter-element referencing
|
|
230
|
+
*/
|
|
231
|
+
id?: string;
|
|
232
|
+
/**
|
|
233
|
+
* - Logical reference, when literal reference is not known
|
|
234
|
+
*/
|
|
235
|
+
identifier?: string | Identifier;
|
|
236
|
+
/**
|
|
237
|
+
* - Literal reference, Relative, internal or absolute URL
|
|
238
|
+
*/
|
|
239
|
+
reference?: string;
|
|
240
|
+
/**
|
|
241
|
+
* - Type the reference refers to (e.g. "Patient")
|
|
242
|
+
*/
|
|
243
|
+
type?: string;
|
|
244
|
+
};
|
package/types/util.d.ts
CHANGED
|
@@ -15,5 +15,7 @@ type RequestOptions = {
|
|
|
15
15
|
query?: Record<string, string>;
|
|
16
16
|
};
|
|
17
17
|
export declare const request: (method: any, path: any, options: RequestOptions) => any;
|
|
18
|
+
export declare function logValidationErrors(response: any, payload: any, logger?: Console): any;
|
|
19
|
+
export declare function cleanResponseObject(state: any, response: any): any;
|
|
18
20
|
export declare function sortBundle(entries: any[]): any[];
|
|
19
21
|
export {};
|