@openfn/language-fhir-eswatini 0.7.2 → 0.7.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/index.cjs CHANGED
@@ -234,18 +234,17 @@ function SzAppointment_default(props) {
234
234
  if (!Array.isArray(props.serviceCategory)) {
235
235
  props.serviceCategory = [props.serviceCategory];
236
236
  }
237
- resource.serviceCategory = import_language_fhir_42.b.concept(import_language_fhir_42.b.lookupValue(
238
- "http://hl7.org/fhir/ValueSet/service-category|4.0.1",
239
- props.serviceCategory
240
- ));
237
+ resource.serviceCategory = props.serviceCategory.map(
238
+ (x) => import_language_fhir_42.b.concept(import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/service-category|4.0.1", x))
239
+ );
241
240
  import_language_fhir_42.b.ensureConceptText(resource.serviceCategory);
242
241
  }
243
242
  if (!import_lodash.default.isNil(props.serviceType)) {
244
243
  if (!Array.isArray(props.serviceType)) {
245
244
  props.serviceType = [props.serviceType];
246
245
  }
247
- resource.serviceType = import_language_fhir_42.b.concept(
248
- import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/service-type|4.0.1", props.serviceType)
246
+ resource.serviceType = props.serviceType.map(
247
+ (x) => import_language_fhir_42.b.concept(import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/service-type|4.0.1", x))
249
248
  );
250
249
  import_language_fhir_42.b.ensureConceptText(resource.serviceType);
251
250
  }
@@ -253,8 +252,8 @@ function SzAppointment_default(props) {
253
252
  if (!Array.isArray(props.specialty)) {
254
253
  props.specialty = [props.specialty];
255
254
  }
256
- resource.specialty = import_language_fhir_42.b.concept(
257
- import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1", props.specialty)
255
+ resource.specialty = props.specialty.map(
256
+ (x) => import_language_fhir_42.b.concept(import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1", x))
258
257
  );
259
258
  import_language_fhir_42.b.ensureConceptText(resource.specialty);
260
259
  }
@@ -268,8 +267,8 @@ function SzAppointment_default(props) {
268
267
  if (!Array.isArray(props.reasonCode)) {
269
268
  props.reasonCode = [props.reasonCode];
270
269
  }
271
- resource.reasonCode = import_language_fhir_42.b.concept(
272
- import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", props.reasonCode)
270
+ resource.reasonCode = props.reasonCode.map(
271
+ (x) => import_language_fhir_42.b.concept(import_language_fhir_42.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", x))
273
272
  );
274
273
  import_language_fhir_42.b.ensureConceptText(resource.reasonCode);
275
274
  }
@@ -348,8 +347,8 @@ function SzCondition_default(props) {
348
347
  if (!Array.isArray(props.category)) {
349
348
  props.category = [props.category];
350
349
  }
351
- resource.category = import_language_fhir_43.b.concept(
352
- import_language_fhir_43.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-category|4.0.1", props.category)
350
+ resource.category = props.category.map(
351
+ (x) => import_language_fhir_43.b.concept(import_language_fhir_43.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-category|4.0.1", x))
353
352
  );
354
353
  import_language_fhir_43.b.ensureConceptText(resource.category);
355
354
  }
@@ -369,8 +368,8 @@ function SzCondition_default(props) {
369
368
  if (!Array.isArray(props.bodySite)) {
370
369
  props.bodySite = [props.bodySite];
371
370
  }
372
- resource.bodySite = import_language_fhir_43.b.concept(
373
- import_language_fhir_43.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
371
+ resource.bodySite = props.bodySite.map(
372
+ (x) => import_language_fhir_43.b.concept(import_language_fhir_43.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
374
373
  );
375
374
  import_language_fhir_43.b.ensureConceptText(resource.bodySite);
376
375
  }
@@ -477,8 +476,8 @@ function SzEncounter_default(props) {
477
476
  if (!Array.isArray(props.type)) {
478
477
  props.type = [props.type];
479
478
  }
480
- resource.type = import_language_fhir_44.b.concept(
481
- import_language_fhir_44.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-type|4.0.1", props.type)
479
+ resource.type = props.type.map(
480
+ (x) => import_language_fhir_44.b.concept(import_language_fhir_44.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-type|4.0.1", x))
482
481
  );
483
482
  import_language_fhir_44.b.ensureConceptText(resource.type);
484
483
  }
@@ -539,8 +538,8 @@ function SzEncounter_default(props) {
539
538
  if (!Array.isArray(props.reasonCode)) {
540
539
  props.reasonCode = [props.reasonCode];
541
540
  }
542
- resource.reasonCode = import_language_fhir_44.b.concept(
543
- import_language_fhir_44.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", props.reasonCode)
541
+ resource.reasonCode = props.reasonCode.map(
542
+ (x) => import_language_fhir_44.b.concept(import_language_fhir_44.b.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", x))
544
543
  );
545
544
  import_language_fhir_44.b.ensureConceptText(resource.reasonCode);
546
545
  }
@@ -634,9 +633,8 @@ function SzEpisodeOfCare_default(props) {
634
633
  if (!Array.isArray(props.type)) {
635
634
  props.type = [props.type];
636
635
  }
637
- resource.type = import_language_fhir_45.b.concept(import_language_fhir_45.b.lookupValue(
638
- "https://hapifhir.eswatinihie.com/fhir/ValueSet/SzEpisodeOfCareTypeVS",
639
- props.type
636
+ resource.type = props.type.map((x) => import_language_fhir_45.b.concept(
637
+ import_language_fhir_45.b.lookupValue("https://hapifhir.eswatinihie.com/fhir/ValueSet/SzEpisodeOfCareTypeVS", x)
640
638
  ));
641
639
  import_language_fhir_45.b.ensureConceptText(resource.type);
642
640
  }
@@ -711,10 +709,10 @@ function SzLocation_default(props) {
711
709
  if (!Array.isArray(props.type)) {
712
710
  props.type = [props.type];
713
711
  }
714
- resource.type = import_language_fhir_46.b.concept(import_language_fhir_46.b.lookupValue(
712
+ resource.type = props.type.map((x) => import_language_fhir_46.b.concept(import_language_fhir_46.b.lookupValue(
715
713
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType|3.0.0",
716
- props.type
717
- ));
714
+ x
715
+ )));
718
716
  import_language_fhir_46.b.ensureConceptText(resource.type);
719
717
  }
720
718
  if (!import_lodash5.default.isNil(props.physicalType)) {
@@ -956,9 +954,8 @@ function SzMedicationRequest_default(props) {
956
954
  if (!Array.isArray(props.category)) {
957
955
  props.category = [props.category];
958
956
  }
959
- resource.category = import_language_fhir_49.b.concept(import_language_fhir_49.b.lookupValue(
960
- "http://hl7.org/fhir/ValueSet/medicationrequest-category|4.0.1",
961
- props.category
957
+ resource.category = props.category.map((x) => import_language_fhir_49.b.concept(
958
+ import_language_fhir_49.b.lookupValue("http://hl7.org/fhir/ValueSet/medicationrequest-category|4.0.1", x)
962
959
  ));
963
960
  import_language_fhir_49.b.ensureConceptText(resource.category);
964
961
  }
@@ -1001,8 +998,8 @@ function SzMedicationRequest_default(props) {
1001
998
  if (!Array.isArray(props.reasonCode)) {
1002
999
  props.reasonCode = [props.reasonCode];
1003
1000
  }
1004
- resource.reasonCode = import_language_fhir_49.b.concept(
1005
- import_language_fhir_49.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", props.reasonCode)
1001
+ resource.reasonCode = props.reasonCode.map(
1002
+ (x) => import_language_fhir_49.b.concept(import_language_fhir_49.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", x))
1006
1003
  );
1007
1004
  import_language_fhir_49.b.ensureConceptText(resource.reasonCode);
1008
1005
  }
@@ -1112,9 +1109,9 @@ function SzCauseOfDeath_default(props) {
1112
1109
  if (!Array.isArray(props.category)) {
1113
1110
  props.category = [props.category];
1114
1111
  }
1115
- resource.category = import_language_fhir_410.b.concept(
1116
- import_language_fhir_410.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1117
- );
1112
+ resource.category = props.category.map((x) => import_language_fhir_410.b.concept(
1113
+ import_language_fhir_410.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1114
+ ));
1118
1115
  import_language_fhir_410.b.ensureConceptText(resource.category);
1119
1116
  }
1120
1117
  if (!import_lodash9.default.isNil(props.code)) {
@@ -1162,9 +1159,8 @@ function SzCauseOfDeath_default(props) {
1162
1159
  if (!Array.isArray(props.interpretation)) {
1163
1160
  props.interpretation = [props.interpretation];
1164
1161
  }
1165
- resource.interpretation = import_language_fhir_410.b.concept(import_language_fhir_410.b.lookupValue(
1166
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1167
- props.interpretation
1162
+ resource.interpretation = props.interpretation.map((x) => import_language_fhir_410.b.concept(
1163
+ import_language_fhir_410.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1168
1164
  ));
1169
1165
  import_language_fhir_410.b.ensureConceptText(resource.interpretation);
1170
1166
  }
@@ -1262,9 +1258,9 @@ function SzClinicalObservation_default(props) {
1262
1258
  if (!Array.isArray(props.category)) {
1263
1259
  props.category = [props.category];
1264
1260
  }
1265
- resource.category = import_language_fhir_411.b.concept(
1266
- import_language_fhir_411.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1267
- );
1261
+ resource.category = props.category.map((x) => import_language_fhir_411.b.concept(
1262
+ import_language_fhir_411.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1263
+ ));
1268
1264
  import_language_fhir_411.b.ensureConceptText(resource.category);
1269
1265
  }
1270
1266
  if (!import_lodash10.default.isNil(props.code)) {
@@ -1310,9 +1306,8 @@ function SzClinicalObservation_default(props) {
1310
1306
  if (!Array.isArray(props.interpretation)) {
1311
1307
  props.interpretation = [props.interpretation];
1312
1308
  }
1313
- resource.interpretation = import_language_fhir_411.b.concept(import_language_fhir_411.b.lookupValue(
1314
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1315
- props.interpretation
1309
+ resource.interpretation = props.interpretation.map((x) => import_language_fhir_411.b.concept(
1310
+ import_language_fhir_411.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1316
1311
  ));
1317
1312
  import_language_fhir_411.b.ensureConceptText(resource.interpretation);
1318
1313
  }
@@ -1428,9 +1423,9 @@ function SzLabResult_default(props) {
1428
1423
  if (!Array.isArray(props.category)) {
1429
1424
  props.category = [props.category];
1430
1425
  }
1431
- resource.category = import_language_fhir_412.b.concept(
1432
- import_language_fhir_412.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1433
- );
1426
+ resource.category = props.category.map((x) => import_language_fhir_412.b.concept(
1427
+ import_language_fhir_412.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1428
+ ));
1434
1429
  import_language_fhir_412.b.ensureConceptText(resource.category);
1435
1430
  }
1436
1431
  if (!import_lodash11.default.isNil(props.code)) {
@@ -1477,9 +1472,8 @@ function SzLabResult_default(props) {
1477
1472
  if (!Array.isArray(props.interpretation)) {
1478
1473
  props.interpretation = [props.interpretation];
1479
1474
  }
1480
- resource.interpretation = import_language_fhir_412.b.concept(import_language_fhir_412.b.lookupValue(
1481
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1482
- props.interpretation
1475
+ resource.interpretation = props.interpretation.map((x) => import_language_fhir_412.b.concept(
1476
+ import_language_fhir_412.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1483
1477
  ));
1484
1478
  import_language_fhir_412.b.ensureConceptText(resource.interpretation);
1485
1479
  }
@@ -1577,9 +1571,9 @@ function SzMannerOfDeath_default(props) {
1577
1571
  if (!Array.isArray(props.category)) {
1578
1572
  props.category = [props.category];
1579
1573
  }
1580
- resource.category = import_language_fhir_413.b.concept(
1581
- import_language_fhir_413.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1582
- );
1574
+ resource.category = props.category.map((x) => import_language_fhir_413.b.concept(
1575
+ import_language_fhir_413.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1576
+ ));
1583
1577
  import_language_fhir_413.b.ensureConceptText(resource.category);
1584
1578
  }
1585
1579
  if (!import_lodash12.default.isNil(props.code)) {
@@ -1627,9 +1621,8 @@ function SzMannerOfDeath_default(props) {
1627
1621
  if (!Array.isArray(props.interpretation)) {
1628
1622
  props.interpretation = [props.interpretation];
1629
1623
  }
1630
- resource.interpretation = import_language_fhir_413.b.concept(import_language_fhir_413.b.lookupValue(
1631
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1632
- props.interpretation
1624
+ resource.interpretation = props.interpretation.map((x) => import_language_fhir_413.b.concept(
1625
+ import_language_fhir_413.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1633
1626
  ));
1634
1627
  import_language_fhir_413.b.ensureConceptText(resource.interpretation);
1635
1628
  }
@@ -1777,9 +1770,8 @@ function SzVitalSigns_default(props) {
1777
1770
  if (!Array.isArray(props.interpretation)) {
1778
1771
  props.interpretation = [props.interpretation];
1779
1772
  }
1780
- resource.interpretation = import_language_fhir_414.b.concept(import_language_fhir_414.b.lookupValue(
1781
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1782
- props.interpretation
1773
+ resource.interpretation = props.interpretation.map((x) => import_language_fhir_414.b.concept(
1774
+ import_language_fhir_414.b.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1783
1775
  ));
1784
1776
  import_language_fhir_414.b.ensureConceptText(resource.interpretation);
1785
1777
  }
@@ -1863,8 +1855,8 @@ function SzOrganization_default(props) {
1863
1855
  if (!Array.isArray(props.type)) {
1864
1856
  props.type = [props.type];
1865
1857
  }
1866
- resource.type = import_language_fhir_415.b.concept(
1867
- import_language_fhir_415.b.lookupValue("http://hl7.org/fhir/ValueSet/organization-type|4.0.1", props.type)
1858
+ resource.type = props.type.map(
1859
+ (x) => import_language_fhir_415.b.concept(import_language_fhir_415.b.lookupValue("http://hl7.org/fhir/ValueSet/organization-type|4.0.1", x))
1868
1860
  );
1869
1861
  import_language_fhir_415.b.ensureConceptText(resource.type);
1870
1862
  }
@@ -2103,8 +2095,8 @@ function SzPractitioner_default(props) {
2103
2095
  if (!Array.isArray(props.communication)) {
2104
2096
  props.communication = [props.communication];
2105
2097
  }
2106
- resource.communication = import_language_fhir_417.b.concept(
2107
- import_language_fhir_417.b.lookupValue("http://hl7.org/fhir/ValueSet/languages|4.0.1", props.communication)
2098
+ resource.communication = props.communication.map(
2099
+ (x) => import_language_fhir_417.b.concept(import_language_fhir_417.b.lookupValue("http://hl7.org/fhir/ValueSet/languages|4.0.1", x))
2108
2100
  );
2109
2101
  import_language_fhir_417.b.ensureConceptText(resource.communication);
2110
2102
  }
@@ -2195,8 +2187,8 @@ function SzProcedure_default(props) {
2195
2187
  if (!Array.isArray(props.reasonCode)) {
2196
2188
  props.reasonCode = [props.reasonCode];
2197
2189
  }
2198
- resource.reasonCode = import_language_fhir_418.b.concept(
2199
- import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2190
+ resource.reasonCode = props.reasonCode.map(
2191
+ (x) => import_language_fhir_418.b.concept(import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2200
2192
  );
2201
2193
  import_language_fhir_418.b.ensureConceptText(resource.reasonCode);
2202
2194
  }
@@ -2210,8 +2202,8 @@ function SzProcedure_default(props) {
2210
2202
  if (!Array.isArray(props.bodySite)) {
2211
2203
  props.bodySite = [props.bodySite];
2212
2204
  }
2213
- resource.bodySite = import_language_fhir_418.b.concept(
2214
- import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2205
+ resource.bodySite = props.bodySite.map(
2206
+ (x) => import_language_fhir_418.b.concept(import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2215
2207
  );
2216
2208
  import_language_fhir_418.b.ensureConceptText(resource.bodySite);
2217
2209
  }
@@ -2231,8 +2223,8 @@ function SzProcedure_default(props) {
2231
2223
  if (!Array.isArray(props.complication)) {
2232
2224
  props.complication = [props.complication];
2233
2225
  }
2234
- resource.complication = import_language_fhir_418.b.concept(
2235
- import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", props.complication)
2226
+ resource.complication = props.complication.map(
2227
+ (x) => import_language_fhir_418.b.concept(import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", x))
2236
2228
  );
2237
2229
  import_language_fhir_418.b.ensureConceptText(resource.complication);
2238
2230
  }
@@ -2246,8 +2238,8 @@ function SzProcedure_default(props) {
2246
2238
  if (!Array.isArray(props.followUp)) {
2247
2239
  props.followUp = [props.followUp];
2248
2240
  }
2249
- resource.followUp = import_language_fhir_418.b.concept(
2250
- import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-followup|4.0.1", props.followUp)
2241
+ resource.followUp = props.followUp.map(
2242
+ (x) => import_language_fhir_418.b.concept(import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-followup|4.0.1", x))
2251
2243
  );
2252
2244
  import_language_fhir_418.b.ensureConceptText(resource.followUp);
2253
2245
  }
@@ -2274,8 +2266,8 @@ function SzProcedure_default(props) {
2274
2266
  if (!Array.isArray(props.usedCode)) {
2275
2267
  props.usedCode = [props.usedCode];
2276
2268
  }
2277
- resource.usedCode = import_language_fhir_418.b.concept(
2278
- import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/device-kind|4.0.1", props.usedCode)
2269
+ resource.usedCode = props.usedCode.map(
2270
+ (x) => import_language_fhir_418.b.concept(import_language_fhir_418.b.lookupValue("http://hl7.org/fhir/ValueSet/device-kind|4.0.1", x))
2279
2271
  );
2280
2272
  import_language_fhir_418.b.ensureConceptText(resource.usedCode);
2281
2273
  }
@@ -2337,9 +2329,8 @@ function SzLabRequest_default(props) {
2337
2329
  if (!Array.isArray(props.orderDetail)) {
2338
2330
  props.orderDetail = [props.orderDetail];
2339
2331
  }
2340
- resource.orderDetail = import_language_fhir_419.b.concept(import_language_fhir_419.b.lookupValue(
2341
- "http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1",
2342
- props.orderDetail
2332
+ resource.orderDetail = props.orderDetail.map((x) => import_language_fhir_419.b.concept(
2333
+ import_language_fhir_419.b.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1", x)
2343
2334
  ));
2344
2335
  import_language_fhir_419.b.ensureConceptText(resource.orderDetail);
2345
2336
  }
@@ -2380,10 +2371,10 @@ function SzLabRequest_default(props) {
2380
2371
  if (!Array.isArray(props.locationCode)) {
2381
2372
  props.locationCode = [props.locationCode];
2382
2373
  }
2383
- resource.locationCode = import_language_fhir_419.b.concept(import_language_fhir_419.b.lookupValue(
2374
+ resource.locationCode = props.locationCode.map((x) => import_language_fhir_419.b.concept(import_language_fhir_419.b.lookupValue(
2384
2375
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType",
2385
- props.locationCode
2386
- ));
2376
+ x
2377
+ )));
2387
2378
  import_language_fhir_419.b.ensureConceptText(resource.locationCode);
2388
2379
  }
2389
2380
  if (!import_lodash18.default.isNil(props.locationReference)) {
@@ -2396,8 +2387,8 @@ function SzLabRequest_default(props) {
2396
2387
  if (!Array.isArray(props.reasonCode)) {
2397
2388
  props.reasonCode = [props.reasonCode];
2398
2389
  }
2399
- resource.reasonCode = import_language_fhir_419.b.concept(
2400
- import_language_fhir_419.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2390
+ resource.reasonCode = props.reasonCode.map(
2391
+ (x) => import_language_fhir_419.b.concept(import_language_fhir_419.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2401
2392
  );
2402
2393
  import_language_fhir_419.b.ensureConceptText(resource.reasonCode);
2403
2394
  }
@@ -2429,8 +2420,8 @@ function SzLabRequest_default(props) {
2429
2420
  if (!Array.isArray(props.bodySite)) {
2430
2421
  props.bodySite = [props.bodySite];
2431
2422
  }
2432
- resource.bodySite = import_language_fhir_419.b.concept(
2433
- import_language_fhir_419.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2423
+ resource.bodySite = props.bodySite.map(
2424
+ (x) => import_language_fhir_419.b.concept(import_language_fhir_419.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2434
2425
  );
2435
2426
  import_language_fhir_419.b.ensureConceptText(resource.bodySite);
2436
2427
  }
@@ -2490,9 +2481,8 @@ function SzReferral_default(props) {
2490
2481
  if (!Array.isArray(props.category)) {
2491
2482
  props.category = [props.category];
2492
2483
  }
2493
- resource.category = import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue(
2494
- "http://hl7.org/fhir/ValueSet/servicerequest-category|4.0.1",
2495
- props.category
2484
+ resource.category = props.category.map((x) => import_language_fhir_420.b.concept(
2485
+ import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-category|4.0.1", x)
2496
2486
  ));
2497
2487
  import_language_fhir_420.b.ensureConceptText(resource.category);
2498
2488
  }
@@ -2506,9 +2496,8 @@ function SzReferral_default(props) {
2506
2496
  if (!Array.isArray(props.orderDetail)) {
2507
2497
  props.orderDetail = [props.orderDetail];
2508
2498
  }
2509
- resource.orderDetail = import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue(
2510
- "http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1",
2511
- props.orderDetail
2499
+ resource.orderDetail = props.orderDetail.map((x) => import_language_fhir_420.b.concept(
2500
+ import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1", x)
2512
2501
  ));
2513
2502
  import_language_fhir_420.b.ensureConceptText(resource.orderDetail);
2514
2503
  }
@@ -2549,10 +2538,10 @@ function SzReferral_default(props) {
2549
2538
  if (!Array.isArray(props.locationCode)) {
2550
2539
  props.locationCode = [props.locationCode];
2551
2540
  }
2552
- resource.locationCode = import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue(
2541
+ resource.locationCode = props.locationCode.map((x) => import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue(
2553
2542
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType",
2554
- props.locationCode
2555
- ));
2543
+ x
2544
+ )));
2556
2545
  import_language_fhir_420.b.ensureConceptText(resource.locationCode);
2557
2546
  }
2558
2547
  if (!import_lodash19.default.isNil(props.locationReference)) {
@@ -2565,8 +2554,8 @@ function SzReferral_default(props) {
2565
2554
  if (!Array.isArray(props.reasonCode)) {
2566
2555
  props.reasonCode = [props.reasonCode];
2567
2556
  }
2568
- resource.reasonCode = import_language_fhir_420.b.concept(
2569
- import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2557
+ resource.reasonCode = props.reasonCode.map(
2558
+ (x) => import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2570
2559
  );
2571
2560
  import_language_fhir_420.b.ensureConceptText(resource.reasonCode);
2572
2561
  }
@@ -2598,8 +2587,8 @@ function SzReferral_default(props) {
2598
2587
  if (!Array.isArray(props.bodySite)) {
2599
2588
  props.bodySite = [props.bodySite];
2600
2589
  }
2601
- resource.bodySite = import_language_fhir_420.b.concept(
2602
- import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2590
+ resource.bodySite = props.bodySite.map(
2591
+ (x) => import_language_fhir_420.b.concept(import_language_fhir_420.b.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2603
2592
  );
2604
2593
  import_language_fhir_420.b.ensureConceptText(resource.bodySite);
2605
2594
  }
@@ -2690,8 +2679,8 @@ function SzLabSpecimen_default(props) {
2690
2679
  if (!Array.isArray(props.condition)) {
2691
2680
  props.condition = [props.condition];
2692
2681
  }
2693
- resource.condition = import_language_fhir_421.b.concept(
2694
- import_language_fhir_421.b.lookupValue("http://terminology.hl7.org/ValueSet/v2-0493|3.0.0", props.condition)
2682
+ resource.condition = props.condition.map(
2683
+ (x) => import_language_fhir_421.b.concept(import_language_fhir_421.b.lookupValue("http://terminology.hl7.org/ValueSet/v2-0493|3.0.0", x))
2695
2684
  );
2696
2685
  import_language_fhir_421.b.ensureConceptText(resource.condition);
2697
2686
  }
@@ -2921,7 +2910,7 @@ function specimen(type, props) {
2921
2910
  // src/Adaptor.ts
2922
2911
  var import_language_fhir_423 = require("@openfn/language-fhir-4");
2923
2912
  var import_language_common = require("@openfn/language-common");
2924
- var BASE_URL = "http://172.209.216.154";
2913
+ var BASE_URL = "https://hapifhir.eswatinihie.com";
2925
2914
  function addToBundle(resources, name = "bundle") {
2926
2915
  return (state) => {
2927
2916
  let [$resources, $name] = (0, import_util.expandReferences)(state, resources, name);
package/dist/index.js CHANGED
@@ -184,18 +184,17 @@ function SzAppointment_default(props) {
184
184
  if (!Array.isArray(props.serviceCategory)) {
185
185
  props.serviceCategory = [props.serviceCategory];
186
186
  }
187
- resource.serviceCategory = dt.concept(dt.lookupValue(
188
- "http://hl7.org/fhir/ValueSet/service-category|4.0.1",
189
- props.serviceCategory
190
- ));
187
+ resource.serviceCategory = props.serviceCategory.map(
188
+ (x) => dt.concept(dt.lookupValue("http://hl7.org/fhir/ValueSet/service-category|4.0.1", x))
189
+ );
191
190
  dt.ensureConceptText(resource.serviceCategory);
192
191
  }
193
192
  if (!_.isNil(props.serviceType)) {
194
193
  if (!Array.isArray(props.serviceType)) {
195
194
  props.serviceType = [props.serviceType];
196
195
  }
197
- resource.serviceType = dt.concept(
198
- dt.lookupValue("http://hl7.org/fhir/ValueSet/service-type|4.0.1", props.serviceType)
196
+ resource.serviceType = props.serviceType.map(
197
+ (x) => dt.concept(dt.lookupValue("http://hl7.org/fhir/ValueSet/service-type|4.0.1", x))
199
198
  );
200
199
  dt.ensureConceptText(resource.serviceType);
201
200
  }
@@ -203,8 +202,8 @@ function SzAppointment_default(props) {
203
202
  if (!Array.isArray(props.specialty)) {
204
203
  props.specialty = [props.specialty];
205
204
  }
206
- resource.specialty = dt.concept(
207
- dt.lookupValue("http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1", props.specialty)
205
+ resource.specialty = props.specialty.map(
206
+ (x) => dt.concept(dt.lookupValue("http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1", x))
208
207
  );
209
208
  dt.ensureConceptText(resource.specialty);
210
209
  }
@@ -218,8 +217,8 @@ function SzAppointment_default(props) {
218
217
  if (!Array.isArray(props.reasonCode)) {
219
218
  props.reasonCode = [props.reasonCode];
220
219
  }
221
- resource.reasonCode = dt.concept(
222
- dt.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", props.reasonCode)
220
+ resource.reasonCode = props.reasonCode.map(
221
+ (x) => dt.concept(dt.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", x))
223
222
  );
224
223
  dt.ensureConceptText(resource.reasonCode);
225
224
  }
@@ -298,8 +297,8 @@ function SzCondition_default(props) {
298
297
  if (!Array.isArray(props.category)) {
299
298
  props.category = [props.category];
300
299
  }
301
- resource.category = dt2.concept(
302
- dt2.lookupValue("http://hl7.org/fhir/ValueSet/condition-category|4.0.1", props.category)
300
+ resource.category = props.category.map(
301
+ (x) => dt2.concept(dt2.lookupValue("http://hl7.org/fhir/ValueSet/condition-category|4.0.1", x))
303
302
  );
304
303
  dt2.ensureConceptText(resource.category);
305
304
  }
@@ -319,8 +318,8 @@ function SzCondition_default(props) {
319
318
  if (!Array.isArray(props.bodySite)) {
320
319
  props.bodySite = [props.bodySite];
321
320
  }
322
- resource.bodySite = dt2.concept(
323
- dt2.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
321
+ resource.bodySite = props.bodySite.map(
322
+ (x) => dt2.concept(dt2.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
324
323
  );
325
324
  dt2.ensureConceptText(resource.bodySite);
326
325
  }
@@ -427,8 +426,8 @@ function SzEncounter_default(props) {
427
426
  if (!Array.isArray(props.type)) {
428
427
  props.type = [props.type];
429
428
  }
430
- resource.type = dt3.concept(
431
- dt3.lookupValue("http://hl7.org/fhir/ValueSet/encounter-type|4.0.1", props.type)
429
+ resource.type = props.type.map(
430
+ (x) => dt3.concept(dt3.lookupValue("http://hl7.org/fhir/ValueSet/encounter-type|4.0.1", x))
432
431
  );
433
432
  dt3.ensureConceptText(resource.type);
434
433
  }
@@ -489,8 +488,8 @@ function SzEncounter_default(props) {
489
488
  if (!Array.isArray(props.reasonCode)) {
490
489
  props.reasonCode = [props.reasonCode];
491
490
  }
492
- resource.reasonCode = dt3.concept(
493
- dt3.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", props.reasonCode)
491
+ resource.reasonCode = props.reasonCode.map(
492
+ (x) => dt3.concept(dt3.lookupValue("http://hl7.org/fhir/ValueSet/encounter-reason|4.0.1", x))
494
493
  );
495
494
  dt3.ensureConceptText(resource.reasonCode);
496
495
  }
@@ -584,9 +583,8 @@ function SzEpisodeOfCare_default(props) {
584
583
  if (!Array.isArray(props.type)) {
585
584
  props.type = [props.type];
586
585
  }
587
- resource.type = dt4.concept(dt4.lookupValue(
588
- "https://hapifhir.eswatinihie.com/fhir/ValueSet/SzEpisodeOfCareTypeVS",
589
- props.type
586
+ resource.type = props.type.map((x) => dt4.concept(
587
+ dt4.lookupValue("https://hapifhir.eswatinihie.com/fhir/ValueSet/SzEpisodeOfCareTypeVS", x)
590
588
  ));
591
589
  dt4.ensureConceptText(resource.type);
592
590
  }
@@ -661,10 +659,10 @@ function SzLocation_default(props) {
661
659
  if (!Array.isArray(props.type)) {
662
660
  props.type = [props.type];
663
661
  }
664
- resource.type = dt5.concept(dt5.lookupValue(
662
+ resource.type = props.type.map((x) => dt5.concept(dt5.lookupValue(
665
663
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType|3.0.0",
666
- props.type
667
- ));
664
+ x
665
+ )));
668
666
  dt5.ensureConceptText(resource.type);
669
667
  }
670
668
  if (!_5.isNil(props.physicalType)) {
@@ -906,9 +904,8 @@ function SzMedicationRequest_default(props) {
906
904
  if (!Array.isArray(props.category)) {
907
905
  props.category = [props.category];
908
906
  }
909
- resource.category = dt8.concept(dt8.lookupValue(
910
- "http://hl7.org/fhir/ValueSet/medicationrequest-category|4.0.1",
911
- props.category
907
+ resource.category = props.category.map((x) => dt8.concept(
908
+ dt8.lookupValue("http://hl7.org/fhir/ValueSet/medicationrequest-category|4.0.1", x)
912
909
  ));
913
910
  dt8.ensureConceptText(resource.category);
914
911
  }
@@ -951,8 +948,8 @@ function SzMedicationRequest_default(props) {
951
948
  if (!Array.isArray(props.reasonCode)) {
952
949
  props.reasonCode = [props.reasonCode];
953
950
  }
954
- resource.reasonCode = dt8.concept(
955
- dt8.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", props.reasonCode)
951
+ resource.reasonCode = props.reasonCode.map(
952
+ (x) => dt8.concept(dt8.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", x))
956
953
  );
957
954
  dt8.ensureConceptText(resource.reasonCode);
958
955
  }
@@ -1062,9 +1059,9 @@ function SzCauseOfDeath_default(props) {
1062
1059
  if (!Array.isArray(props.category)) {
1063
1060
  props.category = [props.category];
1064
1061
  }
1065
- resource.category = dt9.concept(
1066
- dt9.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1067
- );
1062
+ resource.category = props.category.map((x) => dt9.concept(
1063
+ dt9.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1064
+ ));
1068
1065
  dt9.ensureConceptText(resource.category);
1069
1066
  }
1070
1067
  if (!_9.isNil(props.code)) {
@@ -1112,9 +1109,8 @@ function SzCauseOfDeath_default(props) {
1112
1109
  if (!Array.isArray(props.interpretation)) {
1113
1110
  props.interpretation = [props.interpretation];
1114
1111
  }
1115
- resource.interpretation = dt9.concept(dt9.lookupValue(
1116
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1117
- props.interpretation
1112
+ resource.interpretation = props.interpretation.map((x) => dt9.concept(
1113
+ dt9.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1118
1114
  ));
1119
1115
  dt9.ensureConceptText(resource.interpretation);
1120
1116
  }
@@ -1212,9 +1208,9 @@ function SzClinicalObservation_default(props) {
1212
1208
  if (!Array.isArray(props.category)) {
1213
1209
  props.category = [props.category];
1214
1210
  }
1215
- resource.category = dt10.concept(
1216
- dt10.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1217
- );
1211
+ resource.category = props.category.map((x) => dt10.concept(
1212
+ dt10.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1213
+ ));
1218
1214
  dt10.ensureConceptText(resource.category);
1219
1215
  }
1220
1216
  if (!_10.isNil(props.code)) {
@@ -1260,9 +1256,8 @@ function SzClinicalObservation_default(props) {
1260
1256
  if (!Array.isArray(props.interpretation)) {
1261
1257
  props.interpretation = [props.interpretation];
1262
1258
  }
1263
- resource.interpretation = dt10.concept(dt10.lookupValue(
1264
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1265
- props.interpretation
1259
+ resource.interpretation = props.interpretation.map((x) => dt10.concept(
1260
+ dt10.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1266
1261
  ));
1267
1262
  dt10.ensureConceptText(resource.interpretation);
1268
1263
  }
@@ -1378,9 +1373,9 @@ function SzLabResult_default(props) {
1378
1373
  if (!Array.isArray(props.category)) {
1379
1374
  props.category = [props.category];
1380
1375
  }
1381
- resource.category = dt11.concept(
1382
- dt11.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1383
- );
1376
+ resource.category = props.category.map((x) => dt11.concept(
1377
+ dt11.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1378
+ ));
1384
1379
  dt11.ensureConceptText(resource.category);
1385
1380
  }
1386
1381
  if (!_11.isNil(props.code)) {
@@ -1427,9 +1422,8 @@ function SzLabResult_default(props) {
1427
1422
  if (!Array.isArray(props.interpretation)) {
1428
1423
  props.interpretation = [props.interpretation];
1429
1424
  }
1430
- resource.interpretation = dt11.concept(dt11.lookupValue(
1431
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1432
- props.interpretation
1425
+ resource.interpretation = props.interpretation.map((x) => dt11.concept(
1426
+ dt11.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1433
1427
  ));
1434
1428
  dt11.ensureConceptText(resource.interpretation);
1435
1429
  }
@@ -1527,9 +1521,9 @@ function SzMannerOfDeath_default(props) {
1527
1521
  if (!Array.isArray(props.category)) {
1528
1522
  props.category = [props.category];
1529
1523
  }
1530
- resource.category = dt12.concept(
1531
- dt12.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", props.category)
1532
- );
1524
+ resource.category = props.category.map((x) => dt12.concept(
1525
+ dt12.lookupValue("http://hl7.org/fhir/ValueSet/observation-category|4.0.1", x)
1526
+ ));
1533
1527
  dt12.ensureConceptText(resource.category);
1534
1528
  }
1535
1529
  if (!_12.isNil(props.code)) {
@@ -1577,9 +1571,8 @@ function SzMannerOfDeath_default(props) {
1577
1571
  if (!Array.isArray(props.interpretation)) {
1578
1572
  props.interpretation = [props.interpretation];
1579
1573
  }
1580
- resource.interpretation = dt12.concept(dt12.lookupValue(
1581
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1582
- props.interpretation
1574
+ resource.interpretation = props.interpretation.map((x) => dt12.concept(
1575
+ dt12.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1583
1576
  ));
1584
1577
  dt12.ensureConceptText(resource.interpretation);
1585
1578
  }
@@ -1727,9 +1720,8 @@ function SzVitalSigns_default(props) {
1727
1720
  if (!Array.isArray(props.interpretation)) {
1728
1721
  props.interpretation = [props.interpretation];
1729
1722
  }
1730
- resource.interpretation = dt13.concept(dt13.lookupValue(
1731
- "http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1",
1732
- props.interpretation
1723
+ resource.interpretation = props.interpretation.map((x) => dt13.concept(
1724
+ dt13.lookupValue("http://hl7.org/fhir/ValueSet/observation-interpretation|4.0.1", x)
1733
1725
  ));
1734
1726
  dt13.ensureConceptText(resource.interpretation);
1735
1727
  }
@@ -1813,8 +1805,8 @@ function SzOrganization_default(props) {
1813
1805
  if (!Array.isArray(props.type)) {
1814
1806
  props.type = [props.type];
1815
1807
  }
1816
- resource.type = dt14.concept(
1817
- dt14.lookupValue("http://hl7.org/fhir/ValueSet/organization-type|4.0.1", props.type)
1808
+ resource.type = props.type.map(
1809
+ (x) => dt14.concept(dt14.lookupValue("http://hl7.org/fhir/ValueSet/organization-type|4.0.1", x))
1818
1810
  );
1819
1811
  dt14.ensureConceptText(resource.type);
1820
1812
  }
@@ -2053,8 +2045,8 @@ function SzPractitioner_default(props) {
2053
2045
  if (!Array.isArray(props.communication)) {
2054
2046
  props.communication = [props.communication];
2055
2047
  }
2056
- resource.communication = dt16.concept(
2057
- dt16.lookupValue("http://hl7.org/fhir/ValueSet/languages|4.0.1", props.communication)
2048
+ resource.communication = props.communication.map(
2049
+ (x) => dt16.concept(dt16.lookupValue("http://hl7.org/fhir/ValueSet/languages|4.0.1", x))
2058
2050
  );
2059
2051
  dt16.ensureConceptText(resource.communication);
2060
2052
  }
@@ -2145,8 +2137,8 @@ function SzProcedure_default(props) {
2145
2137
  if (!Array.isArray(props.reasonCode)) {
2146
2138
  props.reasonCode = [props.reasonCode];
2147
2139
  }
2148
- resource.reasonCode = dt17.concept(
2149
- dt17.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2140
+ resource.reasonCode = props.reasonCode.map(
2141
+ (x) => dt17.concept(dt17.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2150
2142
  );
2151
2143
  dt17.ensureConceptText(resource.reasonCode);
2152
2144
  }
@@ -2160,8 +2152,8 @@ function SzProcedure_default(props) {
2160
2152
  if (!Array.isArray(props.bodySite)) {
2161
2153
  props.bodySite = [props.bodySite];
2162
2154
  }
2163
- resource.bodySite = dt17.concept(
2164
- dt17.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2155
+ resource.bodySite = props.bodySite.map(
2156
+ (x) => dt17.concept(dt17.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2165
2157
  );
2166
2158
  dt17.ensureConceptText(resource.bodySite);
2167
2159
  }
@@ -2181,8 +2173,8 @@ function SzProcedure_default(props) {
2181
2173
  if (!Array.isArray(props.complication)) {
2182
2174
  props.complication = [props.complication];
2183
2175
  }
2184
- resource.complication = dt17.concept(
2185
- dt17.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", props.complication)
2176
+ resource.complication = props.complication.map(
2177
+ (x) => dt17.concept(dt17.lookupValue("http://hl7.org/fhir/ValueSet/condition-code|4.0.1", x))
2186
2178
  );
2187
2179
  dt17.ensureConceptText(resource.complication);
2188
2180
  }
@@ -2196,8 +2188,8 @@ function SzProcedure_default(props) {
2196
2188
  if (!Array.isArray(props.followUp)) {
2197
2189
  props.followUp = [props.followUp];
2198
2190
  }
2199
- resource.followUp = dt17.concept(
2200
- dt17.lookupValue("http://hl7.org/fhir/ValueSet/procedure-followup|4.0.1", props.followUp)
2191
+ resource.followUp = props.followUp.map(
2192
+ (x) => dt17.concept(dt17.lookupValue("http://hl7.org/fhir/ValueSet/procedure-followup|4.0.1", x))
2201
2193
  );
2202
2194
  dt17.ensureConceptText(resource.followUp);
2203
2195
  }
@@ -2224,8 +2216,8 @@ function SzProcedure_default(props) {
2224
2216
  if (!Array.isArray(props.usedCode)) {
2225
2217
  props.usedCode = [props.usedCode];
2226
2218
  }
2227
- resource.usedCode = dt17.concept(
2228
- dt17.lookupValue("http://hl7.org/fhir/ValueSet/device-kind|4.0.1", props.usedCode)
2219
+ resource.usedCode = props.usedCode.map(
2220
+ (x) => dt17.concept(dt17.lookupValue("http://hl7.org/fhir/ValueSet/device-kind|4.0.1", x))
2229
2221
  );
2230
2222
  dt17.ensureConceptText(resource.usedCode);
2231
2223
  }
@@ -2287,9 +2279,8 @@ function SzLabRequest_default(props) {
2287
2279
  if (!Array.isArray(props.orderDetail)) {
2288
2280
  props.orderDetail = [props.orderDetail];
2289
2281
  }
2290
- resource.orderDetail = dt18.concept(dt18.lookupValue(
2291
- "http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1",
2292
- props.orderDetail
2282
+ resource.orderDetail = props.orderDetail.map((x) => dt18.concept(
2283
+ dt18.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1", x)
2293
2284
  ));
2294
2285
  dt18.ensureConceptText(resource.orderDetail);
2295
2286
  }
@@ -2330,10 +2321,10 @@ function SzLabRequest_default(props) {
2330
2321
  if (!Array.isArray(props.locationCode)) {
2331
2322
  props.locationCode = [props.locationCode];
2332
2323
  }
2333
- resource.locationCode = dt18.concept(dt18.lookupValue(
2324
+ resource.locationCode = props.locationCode.map((x) => dt18.concept(dt18.lookupValue(
2334
2325
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType",
2335
- props.locationCode
2336
- ));
2326
+ x
2327
+ )));
2337
2328
  dt18.ensureConceptText(resource.locationCode);
2338
2329
  }
2339
2330
  if (!_18.isNil(props.locationReference)) {
@@ -2346,8 +2337,8 @@ function SzLabRequest_default(props) {
2346
2337
  if (!Array.isArray(props.reasonCode)) {
2347
2338
  props.reasonCode = [props.reasonCode];
2348
2339
  }
2349
- resource.reasonCode = dt18.concept(
2350
- dt18.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2340
+ resource.reasonCode = props.reasonCode.map(
2341
+ (x) => dt18.concept(dt18.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2351
2342
  );
2352
2343
  dt18.ensureConceptText(resource.reasonCode);
2353
2344
  }
@@ -2379,8 +2370,8 @@ function SzLabRequest_default(props) {
2379
2370
  if (!Array.isArray(props.bodySite)) {
2380
2371
  props.bodySite = [props.bodySite];
2381
2372
  }
2382
- resource.bodySite = dt18.concept(
2383
- dt18.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2373
+ resource.bodySite = props.bodySite.map(
2374
+ (x) => dt18.concept(dt18.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2384
2375
  );
2385
2376
  dt18.ensureConceptText(resource.bodySite);
2386
2377
  }
@@ -2440,9 +2431,8 @@ function SzReferral_default(props) {
2440
2431
  if (!Array.isArray(props.category)) {
2441
2432
  props.category = [props.category];
2442
2433
  }
2443
- resource.category = dt19.concept(dt19.lookupValue(
2444
- "http://hl7.org/fhir/ValueSet/servicerequest-category|4.0.1",
2445
- props.category
2434
+ resource.category = props.category.map((x) => dt19.concept(
2435
+ dt19.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-category|4.0.1", x)
2446
2436
  ));
2447
2437
  dt19.ensureConceptText(resource.category);
2448
2438
  }
@@ -2456,9 +2446,8 @@ function SzReferral_default(props) {
2456
2446
  if (!Array.isArray(props.orderDetail)) {
2457
2447
  props.orderDetail = [props.orderDetail];
2458
2448
  }
2459
- resource.orderDetail = dt19.concept(dt19.lookupValue(
2460
- "http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1",
2461
- props.orderDetail
2449
+ resource.orderDetail = props.orderDetail.map((x) => dt19.concept(
2450
+ dt19.lookupValue("http://hl7.org/fhir/ValueSet/servicerequest-orderdetail|4.0.1", x)
2462
2451
  ));
2463
2452
  dt19.ensureConceptText(resource.orderDetail);
2464
2453
  }
@@ -2499,10 +2488,10 @@ function SzReferral_default(props) {
2499
2488
  if (!Array.isArray(props.locationCode)) {
2500
2489
  props.locationCode = [props.locationCode];
2501
2490
  }
2502
- resource.locationCode = dt19.concept(dt19.lookupValue(
2491
+ resource.locationCode = props.locationCode.map((x) => dt19.concept(dt19.lookupValue(
2503
2492
  "http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType",
2504
- props.locationCode
2505
- ));
2493
+ x
2494
+ )));
2506
2495
  dt19.ensureConceptText(resource.locationCode);
2507
2496
  }
2508
2497
  if (!_19.isNil(props.locationReference)) {
@@ -2515,8 +2504,8 @@ function SzReferral_default(props) {
2515
2504
  if (!Array.isArray(props.reasonCode)) {
2516
2505
  props.reasonCode = [props.reasonCode];
2517
2506
  }
2518
- resource.reasonCode = dt19.concept(
2519
- dt19.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", props.reasonCode)
2507
+ resource.reasonCode = props.reasonCode.map(
2508
+ (x) => dt19.concept(dt19.lookupValue("http://hl7.org/fhir/ValueSet/procedure-reason|4.0.1", x))
2520
2509
  );
2521
2510
  dt19.ensureConceptText(resource.reasonCode);
2522
2511
  }
@@ -2548,8 +2537,8 @@ function SzReferral_default(props) {
2548
2537
  if (!Array.isArray(props.bodySite)) {
2549
2538
  props.bodySite = [props.bodySite];
2550
2539
  }
2551
- resource.bodySite = dt19.concept(
2552
- dt19.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", props.bodySite)
2540
+ resource.bodySite = props.bodySite.map(
2541
+ (x) => dt19.concept(dt19.lookupValue("http://hl7.org/fhir/ValueSet/body-site|4.0.1", x))
2553
2542
  );
2554
2543
  dt19.ensureConceptText(resource.bodySite);
2555
2544
  }
@@ -2640,8 +2629,8 @@ function SzLabSpecimen_default(props) {
2640
2629
  if (!Array.isArray(props.condition)) {
2641
2630
  props.condition = [props.condition];
2642
2631
  }
2643
- resource.condition = dt20.concept(
2644
- dt20.lookupValue("http://terminology.hl7.org/ValueSet/v2-0493|3.0.0", props.condition)
2632
+ resource.condition = props.condition.map(
2633
+ (x) => dt20.concept(dt20.lookupValue("http://terminology.hl7.org/ValueSet/v2-0493|3.0.0", x))
2645
2634
  );
2646
2635
  dt20.ensureConceptText(resource.condition);
2647
2636
  }
@@ -2893,7 +2882,7 @@ import {
2893
2882
  merge,
2894
2883
  sourceValue
2895
2884
  } from "@openfn/language-common";
2896
- var BASE_URL = "http://172.209.216.154";
2885
+ var BASE_URL = "https://hapifhir.eswatinihie.com";
2897
2886
  function addToBundle(resources, name = "bundle") {
2898
2887
  return (state) => {
2899
2888
  let [$resources, $name] = expandReferences(state, resources, name);
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openfn/language-fhir-eswatini",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
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-03-26T17:45:34.361Z",
11
- "generatorVersion": "0.7.6",
10
+ "adaptorGeneratedDate": "2026-03-27T12:36:21.440Z",
11
+ "generatorVersion": "0.7.7",
12
12
  "options": {}
13
13
  },
14
14
  "dependencies": {
15
15
  "@openfn/language-common": "3.2.3",
16
- "@openfn/language-fhir-4": "0.4.1"
16
+ "@openfn/language-fhir-4": "0.4.2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "assertion-error": "2.0.0",
@@ -49,7 +49,7 @@
49
49
  "build": "pnpm clean && build-adaptor fhir-eswatini src ast docs",
50
50
  "build:src": "pnpm generate-fhir fhir-eswatini --base fhir-4",
51
51
  "build:spec": "pnpm generate-fhir fhir-eswatini --respec",
52
- "test": "TS_NODE_TRANSPILE_ONLY=true mocha --experimental-specifier-resolution=node --no-warnings --loader=ts-node/esm test/**/*.test.ts",
52
+ "test": "TS_NODE_TRANSPILE_ONLY=true mocha --experimental-specifier-resolution=node --no-warnings --loader=ts-node/esm **/*.test.ts",
53
53
  "clean": "rimraf dist docs",
54
54
  "pack": "pnpm pack --pack-destination ../../dist"
55
55
  }