@openfn/language-fhir-4 0.2.2 → 0.2.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.
Files changed (3) hide show
  1. package/dist/index.cjs +1293 -0
  2. package/dist/index.js +1293 -0
  3. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -608,6 +608,9 @@ function Account_default(props) {
608
608
  }
609
609
  resource.identifier = identifier(props.identifier);
610
610
  }
611
+ if (!import_lodash2.default.isNil(props.type)) {
612
+ resource.type = concept(props.type);
613
+ }
611
614
  if (!import_lodash2.default.isNil(props.subject)) {
612
615
  if (!Array.isArray(props.subject)) {
613
616
  props.subject = [props.subject];
@@ -666,6 +669,21 @@ function ActivityDefinition_default(props) {
666
669
  delete resource.subject;
667
670
  composite(resource, "subject", props.subject);
668
671
  }
672
+ if (!import_lodash3.default.isNil(props.jurisdiction)) {
673
+ if (!Array.isArray(props.jurisdiction)) {
674
+ props.jurisdiction = [props.jurisdiction];
675
+ }
676
+ resource.jurisdiction = concept(props.jurisdiction);
677
+ }
678
+ if (!import_lodash3.default.isNil(props.topic)) {
679
+ if (!Array.isArray(props.topic)) {
680
+ props.topic = [props.topic];
681
+ }
682
+ resource.topic = concept(props.topic);
683
+ }
684
+ if (!import_lodash3.default.isNil(props.code)) {
685
+ resource.code = concept(props.code);
686
+ }
669
687
  if (!import_lodash3.default.isNil(props.timing)) {
670
688
  delete resource.timing;
671
689
  composite(resource, "timing", props.timing);
@@ -690,6 +708,12 @@ function ActivityDefinition_default(props) {
690
708
  delete resource.product;
691
709
  composite(resource, "product", props.product);
692
710
  }
711
+ if (!import_lodash3.default.isNil(props.bodySite)) {
712
+ if (!Array.isArray(props.bodySite)) {
713
+ props.bodySite = [props.bodySite];
714
+ }
715
+ resource.bodySite = concept(props.bodySite);
716
+ }
693
717
  if (!import_lodash3.default.isNil(props.specimenRequirement)) {
694
718
  if (!Array.isArray(props.specimenRequirement)) {
695
719
  props.specimenRequirement = [props.specimenRequirement];
@@ -743,12 +767,24 @@ function AdministrableProductDefinition_default(props) {
743
767
  }
744
768
  resource.formOf = reference(props.formOf);
745
769
  }
770
+ if (!import_lodash4.default.isNil(props.administrableDoseForm)) {
771
+ resource.administrableDoseForm = concept(props.administrableDoseForm);
772
+ }
773
+ if (!import_lodash4.default.isNil(props.unitOfPresentation)) {
774
+ resource.unitOfPresentation = concept(props.unitOfPresentation);
775
+ }
746
776
  if (!import_lodash4.default.isNil(props.producedFrom)) {
747
777
  if (!Array.isArray(props.producedFrom)) {
748
778
  props.producedFrom = [props.producedFrom];
749
779
  }
750
780
  resource.producedFrom = reference(props.producedFrom);
751
781
  }
782
+ if (!import_lodash4.default.isNil(props.ingredient)) {
783
+ if (!Array.isArray(props.ingredient)) {
784
+ props.ingredient = [props.ingredient];
785
+ }
786
+ resource.ingredient = concept(props.ingredient);
787
+ }
752
788
  if (!import_lodash4.default.isNil(props.device)) {
753
789
  resource.device = reference(props.device);
754
790
  }
@@ -791,6 +827,15 @@ function AdverseEvent_default(props) {
791
827
  if (!import_lodash5.default.isNil(props.identifier)) {
792
828
  resource.identifier = identifier(props.identifier);
793
829
  }
830
+ if (!import_lodash5.default.isNil(props.category)) {
831
+ if (!Array.isArray(props.category)) {
832
+ props.category = [props.category];
833
+ }
834
+ resource.category = concept(props.category);
835
+ }
836
+ if (!import_lodash5.default.isNil(props.event)) {
837
+ resource.event = concept(props.event);
838
+ }
794
839
  if (!import_lodash5.default.isNil(props.subject)) {
795
840
  resource.subject = reference(props.subject);
796
841
  }
@@ -806,6 +851,15 @@ function AdverseEvent_default(props) {
806
851
  if (!import_lodash5.default.isNil(props.location)) {
807
852
  resource.location = reference(props.location);
808
853
  }
854
+ if (!import_lodash5.default.isNil(props.seriousness)) {
855
+ resource.seriousness = concept(props.seriousness);
856
+ }
857
+ if (!import_lodash5.default.isNil(props.severity)) {
858
+ resource.severity = concept(props.severity);
859
+ }
860
+ if (!import_lodash5.default.isNil(props.outcome)) {
861
+ resource.outcome = concept(props.outcome);
862
+ }
809
863
  if (!import_lodash5.default.isNil(props.recorder)) {
810
864
  resource.recorder = reference(props.recorder);
811
865
  }
@@ -862,6 +916,15 @@ function AllergyIntolerance_default(props) {
862
916
  }
863
917
  resource.identifier = identifier(props.identifier);
864
918
  }
919
+ if (!import_lodash6.default.isNil(props.clinicalStatus)) {
920
+ resource.clinicalStatus = concept(props.clinicalStatus);
921
+ }
922
+ if (!import_lodash6.default.isNil(props.verificationStatus)) {
923
+ resource.verificationStatus = concept(props.verificationStatus);
924
+ }
925
+ if (!import_lodash6.default.isNil(props.code)) {
926
+ resource.code = concept(props.code);
927
+ }
865
928
  if (!import_lodash6.default.isNil(props.patient)) {
866
929
  resource.patient = reference(props.patient);
867
930
  }
@@ -907,6 +970,36 @@ function Appointment_default(props) {
907
970
  }
908
971
  resource.identifier = identifier(props.identifier);
909
972
  }
973
+ if (!import_lodash7.default.isNil(props.cancelationReason)) {
974
+ resource.cancelationReason = concept(props.cancelationReason);
975
+ }
976
+ if (!import_lodash7.default.isNil(props.serviceCategory)) {
977
+ if (!Array.isArray(props.serviceCategory)) {
978
+ props.serviceCategory = [props.serviceCategory];
979
+ }
980
+ resource.serviceCategory = concept(props.serviceCategory);
981
+ }
982
+ if (!import_lodash7.default.isNil(props.serviceType)) {
983
+ if (!Array.isArray(props.serviceType)) {
984
+ props.serviceType = [props.serviceType];
985
+ }
986
+ resource.serviceType = concept(props.serviceType);
987
+ }
988
+ if (!import_lodash7.default.isNil(props.specialty)) {
989
+ if (!Array.isArray(props.specialty)) {
990
+ props.specialty = [props.specialty];
991
+ }
992
+ resource.specialty = concept(props.specialty);
993
+ }
994
+ if (!import_lodash7.default.isNil(props.appointmentType)) {
995
+ resource.appointmentType = concept(props.appointmentType);
996
+ }
997
+ if (!import_lodash7.default.isNil(props.reasonCode)) {
998
+ if (!Array.isArray(props.reasonCode)) {
999
+ props.reasonCode = [props.reasonCode];
1000
+ }
1001
+ resource.reasonCode = concept(props.reasonCode);
1002
+ }
910
1003
  if (!import_lodash7.default.isNil(props.reasonReference)) {
911
1004
  if (!Array.isArray(props.reasonReference)) {
912
1005
  props.reasonReference = [props.reasonReference];
@@ -963,6 +1056,12 @@ function AppointmentResponse_default(props) {
963
1056
  if (!import_lodash8.default.isNil(props.appointment)) {
964
1057
  resource.appointment = reference(props.appointment);
965
1058
  }
1059
+ if (!import_lodash8.default.isNil(props.participantType)) {
1060
+ if (!Array.isArray(props.participantType)) {
1061
+ props.participantType = [props.participantType];
1062
+ }
1063
+ resource.participantType = concept(props.participantType);
1064
+ }
966
1065
  if (!import_lodash8.default.isNil(props.actor)) {
967
1066
  resource.actor = reference(props.actor);
968
1067
  }
@@ -982,6 +1081,9 @@ function BiologicallyDerivedProduct_default(props) {
982
1081
  }
983
1082
  resource.identifier = identifier(props.identifier);
984
1083
  }
1084
+ if (!import_lodash9.default.isNil(props.productCode)) {
1085
+ resource.productCode = concept(props.productCode);
1086
+ }
985
1087
  if (!import_lodash9.default.isNil(props.request)) {
986
1088
  if (!Array.isArray(props.request)) {
987
1089
  props.request = [props.request];
@@ -1050,6 +1152,18 @@ function BodyStructure_default(props) {
1050
1152
  }
1051
1153
  resource.identifier = identifier(props.identifier);
1052
1154
  }
1155
+ if (!import_lodash10.default.isNil(props.morphology)) {
1156
+ resource.morphology = concept(props.morphology);
1157
+ }
1158
+ if (!import_lodash10.default.isNil(props.location)) {
1159
+ resource.location = concept(props.location);
1160
+ }
1161
+ if (!import_lodash10.default.isNil(props.locationQualifier)) {
1162
+ if (!Array.isArray(props.locationQualifier)) {
1163
+ props.locationQualifier = [props.locationQualifier];
1164
+ }
1165
+ resource.locationQualifier = concept(props.locationQualifier);
1166
+ }
1053
1167
  if (!import_lodash10.default.isNil(props.patient)) {
1054
1168
  resource.patient = reference(props.patient);
1055
1169
  }
@@ -1087,6 +1201,12 @@ function CarePlan_default(props) {
1087
1201
  }
1088
1202
  resource.partOf = reference(props.partOf);
1089
1203
  }
1204
+ if (!import_lodash11.default.isNil(props.category)) {
1205
+ if (!Array.isArray(props.category)) {
1206
+ props.category = [props.category];
1207
+ }
1208
+ resource.category = concept(props.category);
1209
+ }
1090
1210
  if (!import_lodash11.default.isNil(props.subject)) {
1091
1211
  resource.subject = reference(props.subject);
1092
1212
  }
@@ -1155,6 +1275,12 @@ function CareTeam_default(props) {
1155
1275
  }
1156
1276
  resource.identifier = identifier(props.identifier);
1157
1277
  }
1278
+ if (!import_lodash12.default.isNil(props.category)) {
1279
+ if (!Array.isArray(props.category)) {
1280
+ props.category = [props.category];
1281
+ }
1282
+ resource.category = concept(props.category);
1283
+ }
1158
1284
  if (!import_lodash12.default.isNil(props.subject)) {
1159
1285
  resource.subject = reference(props.subject);
1160
1286
  }
@@ -1174,6 +1300,12 @@ function CareTeam_default(props) {
1174
1300
  resource.participant.push(_participant);
1175
1301
  }
1176
1302
  }
1303
+ if (!import_lodash12.default.isNil(props.reasonCode)) {
1304
+ if (!Array.isArray(props.reasonCode)) {
1305
+ props.reasonCode = [props.reasonCode];
1306
+ }
1307
+ resource.reasonCode = concept(props.reasonCode);
1308
+ }
1177
1309
  if (!import_lodash12.default.isNil(props.reasonReference)) {
1178
1310
  if (!Array.isArray(props.reasonReference)) {
1179
1311
  props.reasonReference = [props.reasonReference];
@@ -1208,6 +1340,9 @@ function ChargeItem_default(props) {
1208
1340
  }
1209
1341
  resource.partOf = reference(props.partOf);
1210
1342
  }
1343
+ if (!import_lodash13.default.isNil(props.code)) {
1344
+ resource.code = concept(props.code);
1345
+ }
1211
1346
  if (!import_lodash13.default.isNil(props.subject)) {
1212
1347
  resource.subject = reference(props.subject);
1213
1348
  }
@@ -1240,9 +1375,21 @@ function ChargeItem_default(props) {
1240
1375
  if (!import_lodash13.default.isNil(props.costCenter)) {
1241
1376
  resource.costCenter = reference(props.costCenter);
1242
1377
  }
1378
+ if (!import_lodash13.default.isNil(props.bodysite)) {
1379
+ if (!Array.isArray(props.bodysite)) {
1380
+ props.bodysite = [props.bodysite];
1381
+ }
1382
+ resource.bodysite = concept(props.bodysite);
1383
+ }
1243
1384
  if (!import_lodash13.default.isNil(props.enterer)) {
1244
1385
  resource.enterer = reference(props.enterer);
1245
1386
  }
1387
+ if (!import_lodash13.default.isNil(props.reason)) {
1388
+ if (!Array.isArray(props.reason)) {
1389
+ props.reason = [props.reason];
1390
+ }
1391
+ resource.reason = concept(props.reason);
1392
+ }
1246
1393
  if (!import_lodash13.default.isNil(props.service)) {
1247
1394
  if (!Array.isArray(props.service)) {
1248
1395
  props.service = [props.service];
@@ -1281,6 +1428,15 @@ function ChargeItemDefinition_default(props) {
1281
1428
  }
1282
1429
  resource.identifier = identifier(props.identifier);
1283
1430
  }
1431
+ if (!import_lodash14.default.isNil(props.jurisdiction)) {
1432
+ if (!Array.isArray(props.jurisdiction)) {
1433
+ props.jurisdiction = [props.jurisdiction];
1434
+ }
1435
+ resource.jurisdiction = concept(props.jurisdiction);
1436
+ }
1437
+ if (!import_lodash14.default.isNil(props.code)) {
1438
+ resource.code = concept(props.code);
1439
+ }
1284
1440
  if (!import_lodash14.default.isNil(props.instance)) {
1285
1441
  if (!Array.isArray(props.instance)) {
1286
1442
  props.instance = [props.instance];
@@ -1329,6 +1485,12 @@ function Citation_default(props) {
1329
1485
  }
1330
1486
  resource.identifier = identifier(props.identifier);
1331
1487
  }
1488
+ if (!import_lodash15.default.isNil(props.jurisdiction)) {
1489
+ if (!Array.isArray(props.jurisdiction)) {
1490
+ props.jurisdiction = [props.jurisdiction];
1491
+ }
1492
+ resource.jurisdiction = concept(props.jurisdiction);
1493
+ }
1332
1494
  if (!import_lodash15.default.isNil(props.summary)) {
1333
1495
  let src = props.summary;
1334
1496
  if (!Array.isArray(src)) {
@@ -1355,6 +1517,12 @@ function Citation_default(props) {
1355
1517
  resource.classification.push(_classification);
1356
1518
  }
1357
1519
  }
1520
+ if (!import_lodash15.default.isNil(props.currentState)) {
1521
+ if (!Array.isArray(props.currentState)) {
1522
+ props.currentState = [props.currentState];
1523
+ }
1524
+ resource.currentState = concept(props.currentState);
1525
+ }
1358
1526
  if (!import_lodash15.default.isNil(props.statusDate)) {
1359
1527
  let src = props.statusDate;
1360
1528
  if (!Array.isArray(src)) {
@@ -1404,6 +1572,12 @@ function Claim_default(props) {
1404
1572
  }
1405
1573
  resource.identifier = identifier(props.identifier);
1406
1574
  }
1575
+ if (!import_lodash16.default.isNil(props.type)) {
1576
+ resource.type = concept(props.type);
1577
+ }
1578
+ if (!import_lodash16.default.isNil(props.subType)) {
1579
+ resource.subType = concept(props.subType);
1580
+ }
1407
1581
  if (!import_lodash16.default.isNil(props.patient)) {
1408
1582
  resource.patient = reference(props.patient);
1409
1583
  }
@@ -1416,6 +1590,12 @@ function Claim_default(props) {
1416
1590
  if (!import_lodash16.default.isNil(props.provider)) {
1417
1591
  resource.provider = reference(props.provider);
1418
1592
  }
1593
+ if (!import_lodash16.default.isNil(props.priority)) {
1594
+ resource.priority = concept(props.priority);
1595
+ }
1596
+ if (!import_lodash16.default.isNil(props.fundsReserve)) {
1597
+ resource.fundsReserve = concept(props.fundsReserve);
1598
+ }
1419
1599
  if (!import_lodash16.default.isNil(props.related)) {
1420
1600
  let src = props.related;
1421
1601
  if (!Array.isArray(src)) {
@@ -1549,6 +1729,12 @@ function ClaimResponse_default(props) {
1549
1729
  }
1550
1730
  resource.identifier = identifier(props.identifier);
1551
1731
  }
1732
+ if (!import_lodash17.default.isNil(props.type)) {
1733
+ resource.type = concept(props.type);
1734
+ }
1735
+ if (!import_lodash17.default.isNil(props.subType)) {
1736
+ resource.subType = concept(props.subType);
1737
+ }
1552
1738
  if (!import_lodash17.default.isNil(props.patient)) {
1553
1739
  resource.patient = reference(props.patient);
1554
1740
  }
@@ -1561,6 +1747,9 @@ function ClaimResponse_default(props) {
1561
1747
  if (!import_lodash17.default.isNil(props.request)) {
1562
1748
  resource.request = reference(props.request);
1563
1749
  }
1750
+ if (!import_lodash17.default.isNil(props.payeeType)) {
1751
+ resource.payeeType = concept(props.payeeType);
1752
+ }
1564
1753
  if (!import_lodash17.default.isNil(props.item)) {
1565
1754
  let src = props.item;
1566
1755
  if (!Array.isArray(src)) {
@@ -1607,6 +1796,12 @@ function ClaimResponse_default(props) {
1607
1796
  };
1608
1797
  resource.payment = _payment;
1609
1798
  }
1799
+ if (!import_lodash17.default.isNil(props.fundsReserve)) {
1800
+ resource.fundsReserve = concept(props.fundsReserve);
1801
+ }
1802
+ if (!import_lodash17.default.isNil(props.formCode)) {
1803
+ resource.formCode = concept(props.formCode);
1804
+ }
1610
1805
  if (!import_lodash17.default.isNil(props.processNote)) {
1611
1806
  let src = props.processNote;
1612
1807
  if (!Array.isArray(src)) {
@@ -1668,6 +1863,12 @@ function ClinicalImpression_default(props) {
1668
1863
  }
1669
1864
  resource.identifier = identifier(props.identifier);
1670
1865
  }
1866
+ if (!import_lodash18.default.isNil(props.statusReason)) {
1867
+ resource.statusReason = concept(props.statusReason);
1868
+ }
1869
+ if (!import_lodash18.default.isNil(props.code)) {
1870
+ resource.code = concept(props.code);
1871
+ }
1671
1872
  if (!import_lodash18.default.isNil(props.subject)) {
1672
1873
  resource.subject = reference(props.subject);
1673
1874
  }
@@ -1716,6 +1917,12 @@ function ClinicalImpression_default(props) {
1716
1917
  resource.finding.push(_finding);
1717
1918
  }
1718
1919
  }
1920
+ if (!import_lodash18.default.isNil(props.prognosisCodeableConcept)) {
1921
+ if (!Array.isArray(props.prognosisCodeableConcept)) {
1922
+ props.prognosisCodeableConcept = [props.prognosisCodeableConcept];
1923
+ }
1924
+ resource.prognosisCodeableConcept = concept(props.prognosisCodeableConcept);
1925
+ }
1719
1926
  if (!import_lodash18.default.isNil(props.prognosisReference)) {
1720
1927
  if (!Array.isArray(props.prognosisReference)) {
1721
1928
  props.prognosisReference = [props.prognosisReference];
@@ -1744,12 +1951,21 @@ function ClinicalUseDefinition_default(props) {
1744
1951
  }
1745
1952
  resource.identifier = identifier(props.identifier);
1746
1953
  }
1954
+ if (!import_lodash19.default.isNil(props.category)) {
1955
+ if (!Array.isArray(props.category)) {
1956
+ props.category = [props.category];
1957
+ }
1958
+ resource.category = concept(props.category);
1959
+ }
1747
1960
  if (!import_lodash19.default.isNil(props.subject)) {
1748
1961
  if (!Array.isArray(props.subject)) {
1749
1962
  props.subject = [props.subject];
1750
1963
  }
1751
1964
  resource.subject = reference(props.subject);
1752
1965
  }
1966
+ if (!import_lodash19.default.isNil(props.status)) {
1967
+ resource.status = concept(props.status);
1968
+ }
1753
1969
  if (!import_lodash19.default.isNil(props.contraindication)) {
1754
1970
  let src = props.contraindication;
1755
1971
  let _contraindication = {
@@ -1825,9 +2041,27 @@ function Communication_default(props) {
1825
2041
  }
1826
2042
  resource.inResponseTo = reference(props.inResponseTo);
1827
2043
  }
2044
+ if (!import_lodash20.default.isNil(props.statusReason)) {
2045
+ resource.statusReason = concept(props.statusReason);
2046
+ }
2047
+ if (!import_lodash20.default.isNil(props.category)) {
2048
+ if (!Array.isArray(props.category)) {
2049
+ props.category = [props.category];
2050
+ }
2051
+ resource.category = concept(props.category);
2052
+ }
2053
+ if (!import_lodash20.default.isNil(props.medium)) {
2054
+ if (!Array.isArray(props.medium)) {
2055
+ props.medium = [props.medium];
2056
+ }
2057
+ resource.medium = concept(props.medium);
2058
+ }
1828
2059
  if (!import_lodash20.default.isNil(props.subject)) {
1829
2060
  resource.subject = reference(props.subject);
1830
2061
  }
2062
+ if (!import_lodash20.default.isNil(props.topic)) {
2063
+ resource.topic = concept(props.topic);
2064
+ }
1831
2065
  if (!import_lodash20.default.isNil(props.about)) {
1832
2066
  if (!Array.isArray(props.about)) {
1833
2067
  props.about = [props.about];
@@ -1846,6 +2080,12 @@ function Communication_default(props) {
1846
2080
  if (!import_lodash20.default.isNil(props.sender)) {
1847
2081
  resource.sender = reference(props.sender);
1848
2082
  }
2083
+ if (!import_lodash20.default.isNil(props.reasonCode)) {
2084
+ if (!Array.isArray(props.reasonCode)) {
2085
+ props.reasonCode = [props.reasonCode];
2086
+ }
2087
+ resource.reasonCode = concept(props.reasonCode);
2088
+ }
1849
2089
  if (!import_lodash20.default.isNil(props.reasonReference)) {
1850
2090
  if (!Array.isArray(props.reasonReference)) {
1851
2091
  props.reasonReference = [props.reasonReference];
@@ -1896,6 +2136,21 @@ function CommunicationRequest_default(props) {
1896
2136
  if (!import_lodash21.default.isNil(props.groupIdentifier)) {
1897
2137
  resource.groupIdentifier = identifier(props.groupIdentifier);
1898
2138
  }
2139
+ if (!import_lodash21.default.isNil(props.statusReason)) {
2140
+ resource.statusReason = concept(props.statusReason);
2141
+ }
2142
+ if (!import_lodash21.default.isNil(props.category)) {
2143
+ if (!Array.isArray(props.category)) {
2144
+ props.category = [props.category];
2145
+ }
2146
+ resource.category = concept(props.category);
2147
+ }
2148
+ if (!import_lodash21.default.isNil(props.medium)) {
2149
+ if (!Array.isArray(props.medium)) {
2150
+ props.medium = [props.medium];
2151
+ }
2152
+ resource.medium = concept(props.medium);
2153
+ }
1899
2154
  if (!import_lodash21.default.isNil(props.subject)) {
1900
2155
  resource.subject = reference(props.subject);
1901
2156
  }
@@ -1937,6 +2192,12 @@ function CommunicationRequest_default(props) {
1937
2192
  if (!import_lodash21.default.isNil(props.sender)) {
1938
2193
  resource.sender = reference(props.sender);
1939
2194
  }
2195
+ if (!import_lodash21.default.isNil(props.reasonCode)) {
2196
+ if (!Array.isArray(props.reasonCode)) {
2197
+ props.reasonCode = [props.reasonCode];
2198
+ }
2199
+ resource.reasonCode = concept(props.reasonCode);
2200
+ }
1940
2201
  if (!import_lodash21.default.isNil(props.reasonReference)) {
1941
2202
  if (!Array.isArray(props.reasonReference)) {
1942
2203
  props.reasonReference = [props.reasonReference];
@@ -1959,9 +2220,18 @@ function Contract_default(props) {
1959
2220
  }
1960
2221
  resource.identifier = identifier(props.identifier);
1961
2222
  }
2223
+ if (!import_lodash22.default.isNil(props.legalState)) {
2224
+ resource.legalState = concept(props.legalState);
2225
+ }
1962
2226
  if (!import_lodash22.default.isNil(props.instantiatesCanonical)) {
1963
2227
  resource.instantiatesCanonical = reference(props.instantiatesCanonical);
1964
2228
  }
2229
+ if (!import_lodash22.default.isNil(props.contentDerivative)) {
2230
+ resource.contentDerivative = concept(props.contentDerivative);
2231
+ }
2232
+ if (!import_lodash22.default.isNil(props.expirationType)) {
2233
+ resource.expirationType = concept(props.expirationType);
2234
+ }
1965
2235
  if (!import_lodash22.default.isNil(props.subject)) {
1966
2236
  if (!Array.isArray(props.subject)) {
1967
2237
  props.subject = [props.subject];
@@ -1989,10 +2259,22 @@ function Contract_default(props) {
1989
2259
  if (!import_lodash22.default.isNil(props.author)) {
1990
2260
  resource.author = reference(props.author);
1991
2261
  }
2262
+ if (!import_lodash22.default.isNil(props.scope)) {
2263
+ resource.scope = concept(props.scope);
2264
+ }
1992
2265
  if (!import_lodash22.default.isNil(props.topic)) {
1993
2266
  delete resource.topic;
1994
2267
  composite(resource, "topic", props.topic);
1995
2268
  }
2269
+ if (!import_lodash22.default.isNil(props.type)) {
2270
+ resource.type = concept(props.type);
2271
+ }
2272
+ if (!import_lodash22.default.isNil(props.subType)) {
2273
+ if (!Array.isArray(props.subType)) {
2274
+ props.subType = [props.subType];
2275
+ }
2276
+ resource.subType = concept(props.subType);
2277
+ }
1996
2278
  if (!import_lodash22.default.isNil(props.contentDefinition)) {
1997
2279
  let src = props.contentDefinition;
1998
2280
  let _contentDefinition = {
@@ -2097,6 +2379,9 @@ function Coverage_default(props) {
2097
2379
  }
2098
2380
  resource.identifier = identifier(props.identifier);
2099
2381
  }
2382
+ if (!import_lodash23.default.isNil(props.type)) {
2383
+ resource.type = concept(props.type);
2384
+ }
2100
2385
  if (!import_lodash23.default.isNil(props.policyHolder)) {
2101
2386
  resource.policyHolder = reference(props.policyHolder);
2102
2387
  }
@@ -2106,6 +2391,9 @@ function Coverage_default(props) {
2106
2391
  if (!import_lodash23.default.isNil(props.beneficiary)) {
2107
2392
  resource.beneficiary = reference(props.beneficiary);
2108
2393
  }
2394
+ if (!import_lodash23.default.isNil(props.relationship)) {
2395
+ resource.relationship = concept(props.relationship);
2396
+ }
2109
2397
  if (!import_lodash23.default.isNil(props.payor)) {
2110
2398
  if (!Array.isArray(props.payor)) {
2111
2399
  props.payor = [props.payor];
@@ -2160,6 +2448,9 @@ function CoverageEligibilityRequest_default(props) {
2160
2448
  }
2161
2449
  resource.identifier = identifier(props.identifier);
2162
2450
  }
2451
+ if (!import_lodash24.default.isNil(props.priority)) {
2452
+ resource.priority = concept(props.priority);
2453
+ }
2163
2454
  if (!import_lodash24.default.isNil(props.patient)) {
2164
2455
  resource.patient = reference(props.patient);
2165
2456
  }
@@ -2263,6 +2554,9 @@ function CoverageEligibilityResponse_default(props) {
2263
2554
  resource.insurance.push(_insurance);
2264
2555
  }
2265
2556
  }
2557
+ if (!import_lodash25.default.isNil(props.form)) {
2558
+ resource.form = concept(props.form);
2559
+ }
2266
2560
  if (!import_lodash25.default.isNil(props.error)) {
2267
2561
  let src = props.error;
2268
2562
  if (!Array.isArray(src)) {
@@ -2292,6 +2586,9 @@ function DetectedIssue_default(props) {
2292
2586
  }
2293
2587
  resource.identifier = identifier(props.identifier);
2294
2588
  }
2589
+ if (!import_lodash26.default.isNil(props.code)) {
2590
+ resource.code = concept(props.code);
2591
+ }
2295
2592
  if (!import_lodash26.default.isNil(props.patient)) {
2296
2593
  resource.patient = reference(props.patient);
2297
2594
  }
@@ -2366,6 +2663,12 @@ function Device_default(props) {
2366
2663
  resource.udiCarrier.push(_udiCarrier);
2367
2664
  }
2368
2665
  }
2666
+ if (!import_lodash27.default.isNil(props.statusReason)) {
2667
+ if (!Array.isArray(props.statusReason)) {
2668
+ props.statusReason = [props.statusReason];
2669
+ }
2670
+ resource.statusReason = concept(props.statusReason);
2671
+ }
2369
2672
  if (!import_lodash27.default.isNil(props.deviceName)) {
2370
2673
  let src = props.deviceName;
2371
2674
  if (!Array.isArray(src)) {
@@ -2379,6 +2682,9 @@ function Device_default(props) {
2379
2682
  resource.deviceName.push(_deviceName);
2380
2683
  }
2381
2684
  }
2685
+ if (!import_lodash27.default.isNil(props.type)) {
2686
+ resource.type = concept(props.type);
2687
+ }
2382
2688
  if (!import_lodash27.default.isNil(props.specialization)) {
2383
2689
  let src = props.specialization;
2384
2690
  if (!Array.isArray(src)) {
@@ -2427,6 +2733,12 @@ function Device_default(props) {
2427
2733
  if (!import_lodash27.default.isNil(props.location)) {
2428
2734
  resource.location = reference(props.location);
2429
2735
  }
2736
+ if (!import_lodash27.default.isNil(props.safety)) {
2737
+ if (!Array.isArray(props.safety)) {
2738
+ props.safety = [props.safety];
2739
+ }
2740
+ resource.safety = concept(props.safety);
2741
+ }
2430
2742
  if (!import_lodash27.default.isNil(props.parent)) {
2431
2743
  resource.parent = reference(props.parent);
2432
2744
  }
@@ -2476,6 +2788,9 @@ function DeviceDefinition_default(props) {
2476
2788
  resource.deviceName.push(_deviceName);
2477
2789
  }
2478
2790
  }
2791
+ if (!import_lodash28.default.isNil(props.type)) {
2792
+ resource.type = concept(props.type);
2793
+ }
2479
2794
  if (!import_lodash28.default.isNil(props.specialization)) {
2480
2795
  let src = props.specialization;
2481
2796
  if (!Array.isArray(src)) {
@@ -2489,6 +2804,18 @@ function DeviceDefinition_default(props) {
2489
2804
  resource.specialization.push(_specialization);
2490
2805
  }
2491
2806
  }
2807
+ if (!import_lodash28.default.isNil(props.safety)) {
2808
+ if (!Array.isArray(props.safety)) {
2809
+ props.safety = [props.safety];
2810
+ }
2811
+ resource.safety = concept(props.safety);
2812
+ }
2813
+ if (!import_lodash28.default.isNil(props.languageCode)) {
2814
+ if (!Array.isArray(props.languageCode)) {
2815
+ props.languageCode = [props.languageCode];
2816
+ }
2817
+ resource.languageCode = concept(props.languageCode);
2818
+ }
2492
2819
  if (!import_lodash28.default.isNil(props.capability)) {
2493
2820
  let src = props.capability;
2494
2821
  if (!Array.isArray(src)) {
@@ -2550,6 +2877,12 @@ function DeviceMetric_default(props) {
2550
2877
  }
2551
2878
  resource.identifier = identifier(props.identifier);
2552
2879
  }
2880
+ if (!import_lodash29.default.isNil(props.type)) {
2881
+ resource.type = concept(props.type);
2882
+ }
2883
+ if (!import_lodash29.default.isNil(props.unit)) {
2884
+ resource.unit = concept(props.unit);
2885
+ }
2553
2886
  if (!import_lodash29.default.isNil(props.source)) {
2554
2887
  resource.source = reference(props.source);
2555
2888
  }
@@ -2630,9 +2963,18 @@ function DeviceRequest_default(props) {
2630
2963
  if (!import_lodash30.default.isNil(props.requester)) {
2631
2964
  resource.requester = reference(props.requester);
2632
2965
  }
2966
+ if (!import_lodash30.default.isNil(props.performerType)) {
2967
+ resource.performerType = concept(props.performerType);
2968
+ }
2633
2969
  if (!import_lodash30.default.isNil(props.performer)) {
2634
2970
  resource.performer = reference(props.performer);
2635
2971
  }
2972
+ if (!import_lodash30.default.isNil(props.reasonCode)) {
2973
+ if (!Array.isArray(props.reasonCode)) {
2974
+ props.reasonCode = [props.reasonCode];
2975
+ }
2976
+ resource.reasonCode = concept(props.reasonCode);
2977
+ }
2636
2978
  if (!import_lodash30.default.isNil(props.reasonReference)) {
2637
2979
  if (!Array.isArray(props.reasonReference)) {
2638
2980
  props.reasonReference = [props.reasonReference];
@@ -2698,12 +3040,21 @@ function DeviceUseStatement_default(props) {
2698
3040
  if (!import_lodash31.default.isNil(props.device)) {
2699
3041
  resource.device = reference(props.device);
2700
3042
  }
3043
+ if (!import_lodash31.default.isNil(props.reasonCode)) {
3044
+ if (!Array.isArray(props.reasonCode)) {
3045
+ props.reasonCode = [props.reasonCode];
3046
+ }
3047
+ resource.reasonCode = concept(props.reasonCode);
3048
+ }
2701
3049
  if (!import_lodash31.default.isNil(props.reasonReference)) {
2702
3050
  if (!Array.isArray(props.reasonReference)) {
2703
3051
  props.reasonReference = [props.reasonReference];
2704
3052
  }
2705
3053
  resource.reasonReference = reference(props.reasonReference);
2706
3054
  }
3055
+ if (!import_lodash31.default.isNil(props.bodySite)) {
3056
+ resource.bodySite = concept(props.bodySite);
3057
+ }
2707
3058
  return resource;
2708
3059
  }
2709
3060
 
@@ -2726,6 +3077,15 @@ function DiagnosticReport_default(props) {
2726
3077
  }
2727
3078
  resource.basedOn = reference(props.basedOn);
2728
3079
  }
3080
+ if (!import_lodash32.default.isNil(props.category)) {
3081
+ if (!Array.isArray(props.category)) {
3082
+ props.category = [props.category];
3083
+ }
3084
+ resource.category = concept(props.category);
3085
+ }
3086
+ if (!import_lodash32.default.isNil(props.code)) {
3087
+ resource.code = concept(props.code);
3088
+ }
2729
3089
  if (!import_lodash32.default.isNil(props.subject)) {
2730
3090
  resource.subject = reference(props.subject);
2731
3091
  }
@@ -2779,6 +3139,12 @@ function DiagnosticReport_default(props) {
2779
3139
  resource.media.push(_media);
2780
3140
  }
2781
3141
  }
3142
+ if (!import_lodash32.default.isNil(props.conclusionCode)) {
3143
+ if (!Array.isArray(props.conclusionCode)) {
3144
+ props.conclusionCode = [props.conclusionCode];
3145
+ }
3146
+ resource.conclusionCode = concept(props.conclusionCode);
3147
+ }
2782
3148
  return resource;
2783
3149
  }
2784
3150
 
@@ -2830,6 +3196,18 @@ function Encounter_default(props) {
2830
3196
  resource.classHistory.push(_classHistory);
2831
3197
  }
2832
3198
  }
3199
+ if (!import_lodash33.default.isNil(props.type)) {
3200
+ if (!Array.isArray(props.type)) {
3201
+ props.type = [props.type];
3202
+ }
3203
+ resource.type = concept(props.type);
3204
+ }
3205
+ if (!import_lodash33.default.isNil(props.serviceType)) {
3206
+ resource.serviceType = concept(props.serviceType);
3207
+ }
3208
+ if (!import_lodash33.default.isNil(props.priority)) {
3209
+ resource.priority = concept(props.priority);
3210
+ }
2833
3211
  if (!import_lodash33.default.isNil(props.subject)) {
2834
3212
  resource.subject = reference(props.subject);
2835
3213
  }
@@ -2864,6 +3242,12 @@ function Encounter_default(props) {
2864
3242
  }
2865
3243
  resource.appointment = reference(props.appointment);
2866
3244
  }
3245
+ if (!import_lodash33.default.isNil(props.reasonCode)) {
3246
+ if (!Array.isArray(props.reasonCode)) {
3247
+ props.reasonCode = [props.reasonCode];
3248
+ }
3249
+ resource.reasonCode = concept(props.reasonCode);
3250
+ }
2867
3251
  if (!import_lodash33.default.isNil(props.reasonReference)) {
2868
3252
  if (!Array.isArray(props.reasonReference)) {
2869
3253
  props.reasonReference = [props.reasonReference];
@@ -2997,6 +3381,12 @@ function EpisodeOfCare_default(props) {
2997
3381
  resource.statusHistory.push(_statusHistory);
2998
3382
  }
2999
3383
  }
3384
+ if (!import_lodash36.default.isNil(props.type)) {
3385
+ if (!Array.isArray(props.type)) {
3386
+ props.type = [props.type];
3387
+ }
3388
+ resource.type = concept(props.type);
3389
+ }
3000
3390
  if (!import_lodash36.default.isNil(props.diagnosis)) {
3001
3391
  let src = props.diagnosis;
3002
3392
  if (!Array.isArray(src)) {
@@ -3057,6 +3447,18 @@ function EventDefinition_default(props) {
3057
3447
  delete resource.subject;
3058
3448
  composite(resource, "subject", props.subject);
3059
3449
  }
3450
+ if (!import_lodash37.default.isNil(props.jurisdiction)) {
3451
+ if (!Array.isArray(props.jurisdiction)) {
3452
+ props.jurisdiction = [props.jurisdiction];
3453
+ }
3454
+ resource.jurisdiction = concept(props.jurisdiction);
3455
+ }
3456
+ if (!import_lodash37.default.isNil(props.topic)) {
3457
+ if (!Array.isArray(props.topic)) {
3458
+ props.topic = [props.topic];
3459
+ }
3460
+ resource.topic = concept(props.topic);
3461
+ }
3060
3462
  return resource;
3061
3463
  }
3062
3464
 
@@ -3090,6 +3492,12 @@ function Evidence_default(props) {
3090
3492
  resource.variableDefinition.push(_variableDefinition);
3091
3493
  }
3092
3494
  }
3495
+ if (!import_lodash38.default.isNil(props.synthesisType)) {
3496
+ resource.synthesisType = concept(props.synthesisType);
3497
+ }
3498
+ if (!import_lodash38.default.isNil(props.studyType)) {
3499
+ resource.studyType = concept(props.studyType);
3500
+ }
3093
3501
  if (!import_lodash38.default.isNil(props.statistic)) {
3094
3502
  let src = props.statistic;
3095
3503
  if (!Array.isArray(src)) {
@@ -3142,6 +3550,9 @@ function EvidenceReport_default(props) {
3142
3550
  delete resource.citeAs;
3143
3551
  composite(resource, "citeAs", props.citeAs);
3144
3552
  }
3553
+ if (!import_lodash39.default.isNil(props.type)) {
3554
+ resource.type = concept(props.type);
3555
+ }
3145
3556
  if (!import_lodash39.default.isNil(props.subject)) {
3146
3557
  let src = props.subject;
3147
3558
  let _subject = {
@@ -3233,6 +3644,12 @@ function ExplanationOfBenefit_default(props) {
3233
3644
  }
3234
3645
  resource.identifier = identifier(props.identifier);
3235
3646
  }
3647
+ if (!import_lodash41.default.isNil(props.type)) {
3648
+ resource.type = concept(props.type);
3649
+ }
3650
+ if (!import_lodash41.default.isNil(props.subType)) {
3651
+ resource.subType = concept(props.subType);
3652
+ }
3236
3653
  if (!import_lodash41.default.isNil(props.patient)) {
3237
3654
  resource.patient = reference(props.patient);
3238
3655
  }
@@ -3245,6 +3662,15 @@ function ExplanationOfBenefit_default(props) {
3245
3662
  if (!import_lodash41.default.isNil(props.provider)) {
3246
3663
  resource.provider = reference(props.provider);
3247
3664
  }
3665
+ if (!import_lodash41.default.isNil(props.priority)) {
3666
+ resource.priority = concept(props.priority);
3667
+ }
3668
+ if (!import_lodash41.default.isNil(props.fundsReserveRequested)) {
3669
+ resource.fundsReserveRequested = concept(props.fundsReserveRequested);
3670
+ }
3671
+ if (!import_lodash41.default.isNil(props.fundsReserve)) {
3672
+ resource.fundsReserve = concept(props.fundsReserve);
3673
+ }
3248
3674
  if (!import_lodash41.default.isNil(props.related)) {
3249
3675
  let src = props.related;
3250
3676
  if (!Array.isArray(src)) {
@@ -3401,6 +3827,9 @@ function ExplanationOfBenefit_default(props) {
3401
3827
  };
3402
3828
  resource.payment = _payment;
3403
3829
  }
3830
+ if (!import_lodash41.default.isNil(props.formCode)) {
3831
+ resource.formCode = concept(props.formCode);
3832
+ }
3404
3833
  if (!import_lodash41.default.isNil(props.processNote)) {
3405
3834
  let src = props.processNote;
3406
3835
  if (!Array.isArray(src)) {
@@ -3443,9 +3872,18 @@ function FamilyMemberHistory_default(props) {
3443
3872
  }
3444
3873
  resource.identifier = identifier(props.identifier);
3445
3874
  }
3875
+ if (!import_lodash42.default.isNil(props.dataAbsentReason)) {
3876
+ resource.dataAbsentReason = concept(props.dataAbsentReason);
3877
+ }
3446
3878
  if (!import_lodash42.default.isNil(props.patient)) {
3447
3879
  resource.patient = reference(props.patient);
3448
3880
  }
3881
+ if (!import_lodash42.default.isNil(props.relationship)) {
3882
+ resource.relationship = concept(props.relationship);
3883
+ }
3884
+ if (!import_lodash42.default.isNil(props.sex)) {
3885
+ resource.sex = concept(props.sex);
3886
+ }
3449
3887
  if (!import_lodash42.default.isNil(props.born)) {
3450
3888
  delete resource.born;
3451
3889
  composite(resource, "born", props.born);
@@ -3458,6 +3896,12 @@ function FamilyMemberHistory_default(props) {
3458
3896
  delete resource.deceased;
3459
3897
  composite(resource, "deceased", props.deceased);
3460
3898
  }
3899
+ if (!import_lodash42.default.isNil(props.reasonCode)) {
3900
+ if (!Array.isArray(props.reasonCode)) {
3901
+ props.reasonCode = [props.reasonCode];
3902
+ }
3903
+ resource.reasonCode = concept(props.reasonCode);
3904
+ }
3461
3905
  if (!import_lodash42.default.isNil(props.reasonReference)) {
3462
3906
  if (!Array.isArray(props.reasonReference)) {
3463
3907
  props.reasonReference = [props.reasonReference];
@@ -3493,6 +3937,15 @@ function Flag_default(props) {
3493
3937
  }
3494
3938
  resource.identifier = identifier(props.identifier);
3495
3939
  }
3940
+ if (!import_lodash43.default.isNil(props.category)) {
3941
+ if (!Array.isArray(props.category)) {
3942
+ props.category = [props.category];
3943
+ }
3944
+ resource.category = concept(props.category);
3945
+ }
3946
+ if (!import_lodash43.default.isNil(props.code)) {
3947
+ resource.code = concept(props.code);
3948
+ }
3496
3949
  if (!import_lodash43.default.isNil(props.subject)) {
3497
3950
  resource.subject = reference(props.subject);
3498
3951
  }
@@ -3518,6 +3971,21 @@ function Goal_default(props) {
3518
3971
  }
3519
3972
  resource.identifier = identifier(props.identifier);
3520
3973
  }
3974
+ if (!import_lodash44.default.isNil(props.achievementStatus)) {
3975
+ resource.achievementStatus = concept(props.achievementStatus);
3976
+ }
3977
+ if (!import_lodash44.default.isNil(props.category)) {
3978
+ if (!Array.isArray(props.category)) {
3979
+ props.category = [props.category];
3980
+ }
3981
+ resource.category = concept(props.category);
3982
+ }
3983
+ if (!import_lodash44.default.isNil(props.priority)) {
3984
+ resource.priority = concept(props.priority);
3985
+ }
3986
+ if (!import_lodash44.default.isNil(props.description)) {
3987
+ resource.description = concept(props.description);
3988
+ }
3521
3989
  if (!import_lodash44.default.isNil(props.subject)) {
3522
3990
  resource.subject = reference(props.subject);
3523
3991
  }
@@ -3547,6 +4015,12 @@ function Goal_default(props) {
3547
4015
  }
3548
4016
  resource.addresses = reference(props.addresses);
3549
4017
  }
4018
+ if (!import_lodash44.default.isNil(props.outcomeCode)) {
4019
+ if (!Array.isArray(props.outcomeCode)) {
4020
+ props.outcomeCode = [props.outcomeCode];
4021
+ }
4022
+ resource.outcomeCode = concept(props.outcomeCode);
4023
+ }
3550
4024
  if (!import_lodash44.default.isNil(props.outcomeReference)) {
3551
4025
  if (!Array.isArray(props.outcomeReference)) {
3552
4026
  props.outcomeReference = [props.outcomeReference];
@@ -3569,6 +4043,9 @@ function Group_default(props) {
3569
4043
  }
3570
4044
  resource.identifier = identifier(props.identifier);
3571
4045
  }
4046
+ if (!import_lodash45.default.isNil(props.code)) {
4047
+ resource.code = concept(props.code);
4048
+ }
3572
4049
  if (!import_lodash45.default.isNil(props.managingEntity)) {
3573
4050
  resource.managingEntity = reference(props.managingEntity);
3574
4051
  }
@@ -3630,6 +4107,12 @@ function GuidanceResponse_default(props) {
3630
4107
  if (!import_lodash46.default.isNil(props.performer)) {
3631
4108
  resource.performer = reference(props.performer);
3632
4109
  }
4110
+ if (!import_lodash46.default.isNil(props.reasonCode)) {
4111
+ if (!Array.isArray(props.reasonCode)) {
4112
+ props.reasonCode = [props.reasonCode];
4113
+ }
4114
+ resource.reasonCode = concept(props.reasonCode);
4115
+ }
3633
4116
  if (!import_lodash46.default.isNil(props.reasonReference)) {
3634
4117
  if (!Array.isArray(props.reasonReference)) {
3635
4118
  props.reasonReference = [props.reasonReference];
@@ -3667,6 +4150,24 @@ function HealthcareService_default(props) {
3667
4150
  if (!import_lodash47.default.isNil(props.providedBy)) {
3668
4151
  resource.providedBy = reference(props.providedBy);
3669
4152
  }
4153
+ if (!import_lodash47.default.isNil(props.category)) {
4154
+ if (!Array.isArray(props.category)) {
4155
+ props.category = [props.category];
4156
+ }
4157
+ resource.category = concept(props.category);
4158
+ }
4159
+ if (!import_lodash47.default.isNil(props.type)) {
4160
+ if (!Array.isArray(props.type)) {
4161
+ props.type = [props.type];
4162
+ }
4163
+ resource.type = concept(props.type);
4164
+ }
4165
+ if (!import_lodash47.default.isNil(props.specialty)) {
4166
+ if (!Array.isArray(props.specialty)) {
4167
+ props.specialty = [props.specialty];
4168
+ }
4169
+ resource.specialty = concept(props.specialty);
4170
+ }
3670
4171
  if (!import_lodash47.default.isNil(props.location)) {
3671
4172
  if (!Array.isArray(props.location)) {
3672
4173
  props.location = [props.location];
@@ -3679,6 +4180,12 @@ function HealthcareService_default(props) {
3679
4180
  }
3680
4181
  resource.coverageArea = reference(props.coverageArea);
3681
4182
  }
4183
+ if (!import_lodash47.default.isNil(props.serviceProvisionCode)) {
4184
+ if (!Array.isArray(props.serviceProvisionCode)) {
4185
+ props.serviceProvisionCode = [props.serviceProvisionCode];
4186
+ }
4187
+ resource.serviceProvisionCode = concept(props.serviceProvisionCode);
4188
+ }
3682
4189
  if (!import_lodash47.default.isNil(props.eligibility)) {
3683
4190
  let src = props.eligibility;
3684
4191
  if (!Array.isArray(src)) {
@@ -3692,6 +4199,30 @@ function HealthcareService_default(props) {
3692
4199
  resource.eligibility.push(_eligibility);
3693
4200
  }
3694
4201
  }
4202
+ if (!import_lodash47.default.isNil(props.program)) {
4203
+ if (!Array.isArray(props.program)) {
4204
+ props.program = [props.program];
4205
+ }
4206
+ resource.program = concept(props.program);
4207
+ }
4208
+ if (!import_lodash47.default.isNil(props.characteristic)) {
4209
+ if (!Array.isArray(props.characteristic)) {
4210
+ props.characteristic = [props.characteristic];
4211
+ }
4212
+ resource.characteristic = concept(props.characteristic);
4213
+ }
4214
+ if (!import_lodash47.default.isNil(props.communication)) {
4215
+ if (!Array.isArray(props.communication)) {
4216
+ props.communication = [props.communication];
4217
+ }
4218
+ resource.communication = concept(props.communication);
4219
+ }
4220
+ if (!import_lodash47.default.isNil(props.referralMethod)) {
4221
+ if (!Array.isArray(props.referralMethod)) {
4222
+ props.referralMethod = [props.referralMethod];
4223
+ }
4224
+ resource.referralMethod = concept(props.referralMethod);
4225
+ }
3695
4226
  if (!import_lodash47.default.isNil(props.availableTime)) {
3696
4227
  let src = props.availableTime;
3697
4228
  if (!Array.isArray(src)) {
@@ -3770,9 +4301,21 @@ function ImagingStudy_default(props) {
3770
4301
  if (!import_lodash48.default.isNil(props.procedureReference)) {
3771
4302
  resource.procedureReference = reference(props.procedureReference);
3772
4303
  }
4304
+ if (!import_lodash48.default.isNil(props.procedureCode)) {
4305
+ if (!Array.isArray(props.procedureCode)) {
4306
+ props.procedureCode = [props.procedureCode];
4307
+ }
4308
+ resource.procedureCode = concept(props.procedureCode);
4309
+ }
3773
4310
  if (!import_lodash48.default.isNil(props.location)) {
3774
4311
  resource.location = reference(props.location);
3775
4312
  }
4313
+ if (!import_lodash48.default.isNil(props.reasonCode)) {
4314
+ if (!Array.isArray(props.reasonCode)) {
4315
+ props.reasonCode = [props.reasonCode];
4316
+ }
4317
+ resource.reasonCode = concept(props.reasonCode);
4318
+ }
3776
4319
  if (!import_lodash48.default.isNil(props.reasonReference)) {
3777
4320
  if (!Array.isArray(props.reasonReference)) {
3778
4321
  props.reasonReference = [props.reasonReference];
@@ -3808,6 +4351,12 @@ function Immunization_default(props) {
3808
4351
  }
3809
4352
  resource.identifier = identifier(props.identifier);
3810
4353
  }
4354
+ if (!import_lodash49.default.isNil(props.statusReason)) {
4355
+ resource.statusReason = concept(props.statusReason);
4356
+ }
4357
+ if (!import_lodash49.default.isNil(props.vaccineCode)) {
4358
+ resource.vaccineCode = concept(props.vaccineCode);
4359
+ }
3811
4360
  if (!import_lodash49.default.isNil(props.patient)) {
3812
4361
  resource.patient = reference(props.patient);
3813
4362
  }
@@ -3818,12 +4367,21 @@ function Immunization_default(props) {
3818
4367
  delete resource.occurrence;
3819
4368
  composite(resource, "occurrence", props.occurrence);
3820
4369
  }
4370
+ if (!import_lodash49.default.isNil(props.reportOrigin)) {
4371
+ resource.reportOrigin = concept(props.reportOrigin);
4372
+ }
3821
4373
  if (!import_lodash49.default.isNil(props.location)) {
3822
4374
  resource.location = reference(props.location);
3823
4375
  }
3824
4376
  if (!import_lodash49.default.isNil(props.manufacturer)) {
3825
4377
  resource.manufacturer = reference(props.manufacturer);
3826
4378
  }
4379
+ if (!import_lodash49.default.isNil(props.site)) {
4380
+ resource.site = concept(props.site);
4381
+ }
4382
+ if (!import_lodash49.default.isNil(props.route)) {
4383
+ resource.route = concept(props.route);
4384
+ }
3827
4385
  if (!import_lodash49.default.isNil(props.performer)) {
3828
4386
  let src = props.performer;
3829
4387
  if (!Array.isArray(src)) {
@@ -3837,12 +4395,24 @@ function Immunization_default(props) {
3837
4395
  resource.performer.push(_performer);
3838
4396
  }
3839
4397
  }
4398
+ if (!import_lodash49.default.isNil(props.reasonCode)) {
4399
+ if (!Array.isArray(props.reasonCode)) {
4400
+ props.reasonCode = [props.reasonCode];
4401
+ }
4402
+ resource.reasonCode = concept(props.reasonCode);
4403
+ }
3840
4404
  if (!import_lodash49.default.isNil(props.reasonReference)) {
3841
4405
  if (!Array.isArray(props.reasonReference)) {
3842
4406
  props.reasonReference = [props.reasonReference];
3843
4407
  }
3844
4408
  resource.reasonReference = reference(props.reasonReference);
3845
4409
  }
4410
+ if (!import_lodash49.default.isNil(props.subpotentReason)) {
4411
+ if (!Array.isArray(props.subpotentReason)) {
4412
+ props.subpotentReason = [props.subpotentReason];
4413
+ }
4414
+ resource.subpotentReason = concept(props.subpotentReason);
4415
+ }
3846
4416
  if (!import_lodash49.default.isNil(props.education)) {
3847
4417
  let src = props.education;
3848
4418
  if (!Array.isArray(src)) {
@@ -3856,6 +4426,15 @@ function Immunization_default(props) {
3856
4426
  resource.education.push(_education);
3857
4427
  }
3858
4428
  }
4429
+ if (!import_lodash49.default.isNil(props.programEligibility)) {
4430
+ if (!Array.isArray(props.programEligibility)) {
4431
+ props.programEligibility = [props.programEligibility];
4432
+ }
4433
+ resource.programEligibility = concept(props.programEligibility);
4434
+ }
4435
+ if (!import_lodash49.default.isNil(props.fundingSource)) {
4436
+ resource.fundingSource = concept(props.fundingSource);
4437
+ }
3859
4438
  if (!import_lodash49.default.isNil(props.reaction)) {
3860
4439
  let src = props.reaction;
3861
4440
  if (!Array.isArray(src)) {
@@ -3904,9 +4483,21 @@ function ImmunizationEvaluation_default(props) {
3904
4483
  if (!import_lodash50.default.isNil(props.authority)) {
3905
4484
  resource.authority = reference(props.authority);
3906
4485
  }
4486
+ if (!import_lodash50.default.isNil(props.targetDisease)) {
4487
+ resource.targetDisease = concept(props.targetDisease);
4488
+ }
3907
4489
  if (!import_lodash50.default.isNil(props.immunizationEvent)) {
3908
4490
  resource.immunizationEvent = reference(props.immunizationEvent);
3909
4491
  }
4492
+ if (!import_lodash50.default.isNil(props.doseStatus)) {
4493
+ resource.doseStatus = concept(props.doseStatus);
4494
+ }
4495
+ if (!import_lodash50.default.isNil(props.doseStatusReason)) {
4496
+ if (!Array.isArray(props.doseStatusReason)) {
4497
+ props.doseStatusReason = [props.doseStatusReason];
4498
+ }
4499
+ resource.doseStatusReason = concept(props.doseStatusReason);
4500
+ }
3910
4501
  if (!import_lodash50.default.isNil(props.doseNumber)) {
3911
4502
  delete resource.doseNumber;
3912
4503
  composite(resource, "doseNumber", props.doseNumber);
@@ -3969,6 +4560,15 @@ function Ingredient_default(props) {
3969
4560
  }
3970
4561
  resource.for = reference(props.for);
3971
4562
  }
4563
+ if (!import_lodash52.default.isNil(props.role)) {
4564
+ resource.role = concept(props.role);
4565
+ }
4566
+ if (!import_lodash52.default.isNil(props.function)) {
4567
+ if (!Array.isArray(props.function)) {
4568
+ props.function = [props.function];
4569
+ }
4570
+ resource.function = concept(props.function);
4571
+ }
3972
4572
  if (!import_lodash52.default.isNil(props.manufacturer)) {
3973
4573
  let src = props.manufacturer;
3974
4574
  if (!Array.isArray(src)) {
@@ -4005,6 +4605,12 @@ function InsurancePlan_default(props) {
4005
4605
  }
4006
4606
  resource.identifier = identifier(props.identifier);
4007
4607
  }
4608
+ if (!import_lodash53.default.isNil(props.type)) {
4609
+ if (!Array.isArray(props.type)) {
4610
+ props.type = [props.type];
4611
+ }
4612
+ resource.type = concept(props.type);
4613
+ }
4008
4614
  if (!import_lodash53.default.isNil(props.ownedBy)) {
4009
4615
  resource.ownedBy = reference(props.ownedBy);
4010
4616
  }
@@ -4084,6 +4690,9 @@ function Invoice_default(props) {
4084
4690
  }
4085
4691
  resource.identifier = identifier(props.identifier);
4086
4692
  }
4693
+ if (!import_lodash54.default.isNil(props.type)) {
4694
+ resource.type = concept(props.type);
4695
+ }
4087
4696
  if (!import_lodash54.default.isNil(props.subject)) {
4088
4697
  resource.subject = reference(props.subject);
4089
4698
  }
@@ -4138,10 +4747,25 @@ function Library_default(props) {
4138
4747
  }
4139
4748
  resource.identifier = identifier(props.identifier);
4140
4749
  }
4750
+ if (!import_lodash55.default.isNil(props.type)) {
4751
+ resource.type = concept(props.type);
4752
+ }
4141
4753
  if (!import_lodash55.default.isNil(props.subject)) {
4142
4754
  delete resource.subject;
4143
4755
  composite(resource, "subject", props.subject);
4144
4756
  }
4757
+ if (!import_lodash55.default.isNil(props.jurisdiction)) {
4758
+ if (!Array.isArray(props.jurisdiction)) {
4759
+ props.jurisdiction = [props.jurisdiction];
4760
+ }
4761
+ resource.jurisdiction = concept(props.jurisdiction);
4762
+ }
4763
+ if (!import_lodash55.default.isNil(props.topic)) {
4764
+ if (!Array.isArray(props.topic)) {
4765
+ props.topic = [props.topic];
4766
+ }
4767
+ resource.topic = concept(props.topic);
4768
+ }
4145
4769
  return resource;
4146
4770
  }
4147
4771
 
@@ -4158,6 +4782,9 @@ function List_default(props) {
4158
4782
  }
4159
4783
  resource.identifier = identifier(props.identifier);
4160
4784
  }
4785
+ if (!import_lodash56.default.isNil(props.code)) {
4786
+ resource.code = concept(props.code);
4787
+ }
4161
4788
  if (!import_lodash56.default.isNil(props.subject)) {
4162
4789
  resource.subject = reference(props.subject);
4163
4790
  }
@@ -4167,6 +4794,9 @@ function List_default(props) {
4167
4794
  if (!import_lodash56.default.isNil(props.source)) {
4168
4795
  resource.source = reference(props.source);
4169
4796
  }
4797
+ if (!import_lodash56.default.isNil(props.orderedBy)) {
4798
+ resource.orderedBy = concept(props.orderedBy);
4799
+ }
4170
4800
  if (!import_lodash56.default.isNil(props.entry)) {
4171
4801
  let src = props.entry;
4172
4802
  if (!Array.isArray(src)) {
@@ -4180,6 +4810,9 @@ function List_default(props) {
4180
4810
  resource.entry.push(_entry);
4181
4811
  }
4182
4812
  }
4813
+ if (!import_lodash56.default.isNil(props.emptyReason)) {
4814
+ resource.emptyReason = concept(props.emptyReason);
4815
+ }
4183
4816
  return resource;
4184
4817
  }
4185
4818
 
@@ -4196,6 +4829,15 @@ function Location_default(props) {
4196
4829
  }
4197
4830
  resource.identifier = identifier(props.identifier);
4198
4831
  }
4832
+ if (!import_lodash57.default.isNil(props.type)) {
4833
+ if (!Array.isArray(props.type)) {
4834
+ props.type = [props.type];
4835
+ }
4836
+ resource.type = concept(props.type);
4837
+ }
4838
+ if (!import_lodash57.default.isNil(props.physicalType)) {
4839
+ resource.physicalType = concept(props.physicalType);
4840
+ }
4199
4841
  if (!import_lodash57.default.isNil(props.position)) {
4200
4842
  let src = props.position;
4201
4843
  let _position = {
@@ -4244,12 +4886,24 @@ function ManufacturedItemDefinition_default(props) {
4244
4886
  }
4245
4887
  resource.identifier = identifier(props.identifier);
4246
4888
  }
4889
+ if (!import_lodash58.default.isNil(props.manufacturedDoseForm)) {
4890
+ resource.manufacturedDoseForm = concept(props.manufacturedDoseForm);
4891
+ }
4892
+ if (!import_lodash58.default.isNil(props.unitOfPresentation)) {
4893
+ resource.unitOfPresentation = concept(props.unitOfPresentation);
4894
+ }
4247
4895
  if (!import_lodash58.default.isNil(props.manufacturer)) {
4248
4896
  if (!Array.isArray(props.manufacturer)) {
4249
4897
  props.manufacturer = [props.manufacturer];
4250
4898
  }
4251
4899
  resource.manufacturer = reference(props.manufacturer);
4252
4900
  }
4901
+ if (!import_lodash58.default.isNil(props.ingredient)) {
4902
+ if (!Array.isArray(props.ingredient)) {
4903
+ props.ingredient = [props.ingredient];
4904
+ }
4905
+ resource.ingredient = concept(props.ingredient);
4906
+ }
4253
4907
  if (!import_lodash58.default.isNil(props.property)) {
4254
4908
  let src = props.property;
4255
4909
  if (!Array.isArray(src)) {
@@ -4283,6 +4937,33 @@ function Measure_default(props) {
4283
4937
  delete resource.subject;
4284
4938
  composite(resource, "subject", props.subject);
4285
4939
  }
4940
+ if (!import_lodash59.default.isNil(props.jurisdiction)) {
4941
+ if (!Array.isArray(props.jurisdiction)) {
4942
+ props.jurisdiction = [props.jurisdiction];
4943
+ }
4944
+ resource.jurisdiction = concept(props.jurisdiction);
4945
+ }
4946
+ if (!import_lodash59.default.isNil(props.topic)) {
4947
+ if (!Array.isArray(props.topic)) {
4948
+ props.topic = [props.topic];
4949
+ }
4950
+ resource.topic = concept(props.topic);
4951
+ }
4952
+ if (!import_lodash59.default.isNil(props.scoring)) {
4953
+ resource.scoring = concept(props.scoring);
4954
+ }
4955
+ if (!import_lodash59.default.isNil(props.compositeScoring)) {
4956
+ resource.compositeScoring = concept(props.compositeScoring);
4957
+ }
4958
+ if (!import_lodash59.default.isNil(props.type)) {
4959
+ if (!Array.isArray(props.type)) {
4960
+ props.type = [props.type];
4961
+ }
4962
+ resource.type = concept(props.type);
4963
+ }
4964
+ if (!import_lodash59.default.isNil(props.improvementNotation)) {
4965
+ resource.improvementNotation = concept(props.improvementNotation);
4966
+ }
4286
4967
  if (!import_lodash59.default.isNil(props.group)) {
4287
4968
  let src = props.group;
4288
4969
  if (!Array.isArray(src)) {
@@ -4331,6 +5012,9 @@ function MeasureReport_default(props) {
4331
5012
  if (!import_lodash60.default.isNil(props.reporter)) {
4332
5013
  resource.reporter = reference(props.reporter);
4333
5014
  }
5015
+ if (!import_lodash60.default.isNil(props.improvementNotation)) {
5016
+ resource.improvementNotation = concept(props.improvementNotation);
5017
+ }
4334
5018
  if (!import_lodash60.default.isNil(props.group)) {
4335
5019
  let src = props.group;
4336
5020
  if (!Array.isArray(src)) {
@@ -4378,6 +5062,15 @@ function Media_default(props) {
4378
5062
  }
4379
5063
  resource.partOf = reference(props.partOf);
4380
5064
  }
5065
+ if (!import_lodash61.default.isNil(props.type)) {
5066
+ resource.type = concept(props.type);
5067
+ }
5068
+ if (!import_lodash61.default.isNil(props.modality)) {
5069
+ resource.modality = concept(props.modality);
5070
+ }
5071
+ if (!import_lodash61.default.isNil(props.view)) {
5072
+ resource.view = concept(props.view);
5073
+ }
4381
5074
  if (!import_lodash61.default.isNil(props.subject)) {
4382
5075
  resource.subject = reference(props.subject);
4383
5076
  }
@@ -4391,6 +5084,15 @@ function Media_default(props) {
4391
5084
  if (!import_lodash61.default.isNil(props.operator)) {
4392
5085
  resource.operator = reference(props.operator);
4393
5086
  }
5087
+ if (!import_lodash61.default.isNil(props.reasonCode)) {
5088
+ if (!Array.isArray(props.reasonCode)) {
5089
+ props.reasonCode = [props.reasonCode];
5090
+ }
5091
+ resource.reasonCode = concept(props.reasonCode);
5092
+ }
5093
+ if (!import_lodash61.default.isNil(props.bodySite)) {
5094
+ resource.bodySite = concept(props.bodySite);
5095
+ }
4394
5096
  if (!import_lodash61.default.isNil(props.device)) {
4395
5097
  resource.device = reference(props.device);
4396
5098
  }
@@ -4410,9 +5112,15 @@ function Medication_default(props) {
4410
5112
  }
4411
5113
  resource.identifier = identifier(props.identifier);
4412
5114
  }
5115
+ if (!import_lodash62.default.isNil(props.code)) {
5116
+ resource.code = concept(props.code);
5117
+ }
4413
5118
  if (!import_lodash62.default.isNil(props.manufacturer)) {
4414
5119
  resource.manufacturer = reference(props.manufacturer);
4415
5120
  }
5121
+ if (!import_lodash62.default.isNil(props.form)) {
5122
+ resource.form = concept(props.form);
5123
+ }
4416
5124
  if (!import_lodash62.default.isNil(props.ingredient)) {
4417
5125
  let src = props.ingredient;
4418
5126
  if (!Array.isArray(src)) {
@@ -4455,6 +5163,15 @@ function MedicationAdministration_default(props) {
4455
5163
  }
4456
5164
  resource.partOf = reference(props.partOf);
4457
5165
  }
5166
+ if (!import_lodash63.default.isNil(props.statusReason)) {
5167
+ if (!Array.isArray(props.statusReason)) {
5168
+ props.statusReason = [props.statusReason];
5169
+ }
5170
+ resource.statusReason = concept(props.statusReason);
5171
+ }
5172
+ if (!import_lodash63.default.isNil(props.category)) {
5173
+ resource.category = concept(props.category);
5174
+ }
4458
5175
  if (!import_lodash63.default.isNil(props.medication)) {
4459
5176
  delete resource.medication;
4460
5177
  composite(resource, "medication", props.medication);
@@ -4488,6 +5205,12 @@ function MedicationAdministration_default(props) {
4488
5205
  resource.performer.push(_performer);
4489
5206
  }
4490
5207
  }
5208
+ if (!import_lodash63.default.isNil(props.reasonCode)) {
5209
+ if (!Array.isArray(props.reasonCode)) {
5210
+ props.reasonCode = [props.reasonCode];
5211
+ }
5212
+ resource.reasonCode = concept(props.reasonCode);
5213
+ }
4491
5214
  if (!import_lodash63.default.isNil(props.reasonReference)) {
4492
5215
  if (!Array.isArray(props.reasonReference)) {
4493
5216
  props.reasonReference = [props.reasonReference];
@@ -4542,6 +5265,9 @@ function MedicationDispense_default(props) {
4542
5265
  delete resource.statusReason;
4543
5266
  composite(resource, "statusReason", props.statusReason);
4544
5267
  }
5268
+ if (!import_lodash64.default.isNil(props.category)) {
5269
+ resource.category = concept(props.category);
5270
+ }
4545
5271
  if (!import_lodash64.default.isNil(props.medication)) {
4546
5272
  delete resource.medication;
4547
5273
  composite(resource, "medication", props.medication);
@@ -4580,6 +5306,9 @@ function MedicationDispense_default(props) {
4580
5306
  }
4581
5307
  resource.authorizingPrescription = reference(props.authorizingPrescription);
4582
5308
  }
5309
+ if (!import_lodash64.default.isNil(props.type)) {
5310
+ resource.type = concept(props.type);
5311
+ }
4583
5312
  if (!import_lodash64.default.isNil(props.destination)) {
4584
5313
  resource.destination = reference(props.destination);
4585
5314
  }
@@ -4618,9 +5347,15 @@ function MedicationKnowledge_default(props) {
4618
5347
  resourceType: "MedicationKnowledge",
4619
5348
  ...props
4620
5349
  };
5350
+ if (!import_lodash65.default.isNil(props.code)) {
5351
+ resource.code = concept(props.code);
5352
+ }
4621
5353
  if (!import_lodash65.default.isNil(props.manufacturer)) {
4622
5354
  resource.manufacturer = reference(props.manufacturer);
4623
5355
  }
5356
+ if (!import_lodash65.default.isNil(props.doseForm)) {
5357
+ resource.doseForm = concept(props.doseForm);
5358
+ }
4624
5359
  if (!import_lodash65.default.isNil(props.relatedMedicationKnowledge)) {
4625
5360
  let src = props.relatedMedicationKnowledge;
4626
5361
  if (!Array.isArray(src)) {
@@ -4640,6 +5375,12 @@ function MedicationKnowledge_default(props) {
4640
5375
  }
4641
5376
  resource.associatedMedication = reference(props.associatedMedication);
4642
5377
  }
5378
+ if (!import_lodash65.default.isNil(props.productType)) {
5379
+ if (!Array.isArray(props.productType)) {
5380
+ props.productType = [props.productType];
5381
+ }
5382
+ resource.productType = concept(props.productType);
5383
+ }
4643
5384
  if (!import_lodash65.default.isNil(props.monograph)) {
4644
5385
  let src = props.monograph;
4645
5386
  if (!Array.isArray(src)) {
@@ -4666,6 +5407,12 @@ function MedicationKnowledge_default(props) {
4666
5407
  resource.ingredient.push(_ingredient);
4667
5408
  }
4668
5409
  }
5410
+ if (!import_lodash65.default.isNil(props.intendedRoute)) {
5411
+ if (!Array.isArray(props.intendedRoute)) {
5412
+ props.intendedRoute = [props.intendedRoute];
5413
+ }
5414
+ resource.intendedRoute = concept(props.intendedRoute);
5415
+ }
4669
5416
  if (!import_lodash65.default.isNil(props.cost)) {
4670
5417
  let src = props.cost;
4671
5418
  if (!Array.isArray(src)) {
@@ -4786,6 +5533,15 @@ function MedicationRequest_default(props) {
4786
5533
  }
4787
5534
  resource.identifier = identifier(props.identifier);
4788
5535
  }
5536
+ if (!import_lodash66.default.isNil(props.statusReason)) {
5537
+ resource.statusReason = concept(props.statusReason);
5538
+ }
5539
+ if (!import_lodash66.default.isNil(props.category)) {
5540
+ if (!Array.isArray(props.category)) {
5541
+ props.category = [props.category];
5542
+ }
5543
+ resource.category = concept(props.category);
5544
+ }
4789
5545
  if (!import_lodash66.default.isNil(props.reported)) {
4790
5546
  delete resource.reported;
4791
5547
  composite(resource, "reported", props.reported);
@@ -4812,9 +5568,18 @@ function MedicationRequest_default(props) {
4812
5568
  if (!import_lodash66.default.isNil(props.performer)) {
4813
5569
  resource.performer = reference(props.performer);
4814
5570
  }
5571
+ if (!import_lodash66.default.isNil(props.performerType)) {
5572
+ resource.performerType = concept(props.performerType);
5573
+ }
4815
5574
  if (!import_lodash66.default.isNil(props.recorder)) {
4816
5575
  resource.recorder = reference(props.recorder);
4817
5576
  }
5577
+ if (!import_lodash66.default.isNil(props.reasonCode)) {
5578
+ if (!Array.isArray(props.reasonCode)) {
5579
+ props.reasonCode = [props.reasonCode];
5580
+ }
5581
+ resource.reasonCode = concept(props.reasonCode);
5582
+ }
4818
5583
  if (!import_lodash66.default.isNil(props.reasonReference)) {
4819
5584
  if (!Array.isArray(props.reasonReference)) {
4820
5585
  props.reasonReference = [props.reasonReference];
@@ -4830,6 +5595,9 @@ function MedicationRequest_default(props) {
4830
5595
  if (!import_lodash66.default.isNil(props.groupIdentifier)) {
4831
5596
  resource.groupIdentifier = identifier(props.groupIdentifier);
4832
5597
  }
5598
+ if (!import_lodash66.default.isNil(props.courseOfTherapyType)) {
5599
+ resource.courseOfTherapyType = concept(props.courseOfTherapyType);
5600
+ }
4833
5601
  if (!import_lodash66.default.isNil(props.insurance)) {
4834
5602
  if (!Array.isArray(props.insurance)) {
4835
5603
  props.insurance = [props.insurance];
@@ -4893,6 +5661,15 @@ function MedicationStatement_default(props) {
4893
5661
  }
4894
5662
  resource.partOf = reference(props.partOf);
4895
5663
  }
5664
+ if (!import_lodash67.default.isNil(props.statusReason)) {
5665
+ if (!Array.isArray(props.statusReason)) {
5666
+ props.statusReason = [props.statusReason];
5667
+ }
5668
+ resource.statusReason = concept(props.statusReason);
5669
+ }
5670
+ if (!import_lodash67.default.isNil(props.category)) {
5671
+ resource.category = concept(props.category);
5672
+ }
4896
5673
  if (!import_lodash67.default.isNil(props.medication)) {
4897
5674
  delete resource.medication;
4898
5675
  composite(resource, "medication", props.medication);
@@ -4916,6 +5693,12 @@ function MedicationStatement_default(props) {
4916
5693
  }
4917
5694
  resource.derivedFrom = reference(props.derivedFrom);
4918
5695
  }
5696
+ if (!import_lodash67.default.isNil(props.reasonCode)) {
5697
+ if (!Array.isArray(props.reasonCode)) {
5698
+ props.reasonCode = [props.reasonCode];
5699
+ }
5700
+ resource.reasonCode = concept(props.reasonCode);
5701
+ }
4919
5702
  if (!import_lodash67.default.isNil(props.reasonReference)) {
4920
5703
  if (!Array.isArray(props.reasonReference)) {
4921
5704
  props.reasonReference = [props.reasonReference];
@@ -4938,6 +5721,57 @@ function MedicinalProductDefinition_default(props) {
4938
5721
  }
4939
5722
  resource.identifier = identifier(props.identifier);
4940
5723
  }
5724
+ if (!import_lodash68.default.isNil(props.type)) {
5725
+ resource.type = concept(props.type);
5726
+ }
5727
+ if (!import_lodash68.default.isNil(props.domain)) {
5728
+ resource.domain = concept(props.domain);
5729
+ }
5730
+ if (!import_lodash68.default.isNil(props.status)) {
5731
+ resource.status = concept(props.status);
5732
+ }
5733
+ if (!import_lodash68.default.isNil(props.combinedPharmaceuticalDoseForm)) {
5734
+ resource.combinedPharmaceuticalDoseForm = concept(props.combinedPharmaceuticalDoseForm);
5735
+ }
5736
+ if (!import_lodash68.default.isNil(props.route)) {
5737
+ if (!Array.isArray(props.route)) {
5738
+ props.route = [props.route];
5739
+ }
5740
+ resource.route = concept(props.route);
5741
+ }
5742
+ if (!import_lodash68.default.isNil(props.legalStatusOfSupply)) {
5743
+ resource.legalStatusOfSupply = concept(props.legalStatusOfSupply);
5744
+ }
5745
+ if (!import_lodash68.default.isNil(props.additionalMonitoringIndicator)) {
5746
+ resource.additionalMonitoringIndicator = concept(props.additionalMonitoringIndicator);
5747
+ }
5748
+ if (!import_lodash68.default.isNil(props.specialMeasures)) {
5749
+ if (!Array.isArray(props.specialMeasures)) {
5750
+ props.specialMeasures = [props.specialMeasures];
5751
+ }
5752
+ resource.specialMeasures = concept(props.specialMeasures);
5753
+ }
5754
+ if (!import_lodash68.default.isNil(props.pediatricUseIndicator)) {
5755
+ resource.pediatricUseIndicator = concept(props.pediatricUseIndicator);
5756
+ }
5757
+ if (!import_lodash68.default.isNil(props.classification)) {
5758
+ if (!Array.isArray(props.classification)) {
5759
+ props.classification = [props.classification];
5760
+ }
5761
+ resource.classification = concept(props.classification);
5762
+ }
5763
+ if (!import_lodash68.default.isNil(props.packagedMedicinalProduct)) {
5764
+ if (!Array.isArray(props.packagedMedicinalProduct)) {
5765
+ props.packagedMedicinalProduct = [props.packagedMedicinalProduct];
5766
+ }
5767
+ resource.packagedMedicinalProduct = concept(props.packagedMedicinalProduct);
5768
+ }
5769
+ if (!import_lodash68.default.isNil(props.ingredient)) {
5770
+ if (!Array.isArray(props.ingredient)) {
5771
+ props.ingredient = [props.ingredient];
5772
+ }
5773
+ resource.ingredient = concept(props.ingredient);
5774
+ }
4941
5775
  if (!import_lodash68.default.isNil(props.attachedDocument)) {
4942
5776
  if (!Array.isArray(props.attachedDocument)) {
4943
5777
  props.attachedDocument = [props.attachedDocument];
@@ -5145,6 +5979,18 @@ function NutritionOrder_default(props) {
5145
5979
  }
5146
5980
  resource.allergyIntolerance = reference(props.allergyIntolerance);
5147
5981
  }
5982
+ if (!import_lodash70.default.isNil(props.foodPreferenceModifier)) {
5983
+ if (!Array.isArray(props.foodPreferenceModifier)) {
5984
+ props.foodPreferenceModifier = [props.foodPreferenceModifier];
5985
+ }
5986
+ resource.foodPreferenceModifier = concept(props.foodPreferenceModifier);
5987
+ }
5988
+ if (!import_lodash70.default.isNil(props.excludeFoodModifier)) {
5989
+ if (!Array.isArray(props.excludeFoodModifier)) {
5990
+ props.excludeFoodModifier = [props.excludeFoodModifier];
5991
+ }
5992
+ resource.excludeFoodModifier = concept(props.excludeFoodModifier);
5993
+ }
5148
5994
  if (!import_lodash70.default.isNil(props.oralDiet)) {
5149
5995
  let src = props.oralDiet;
5150
5996
  let _oralDiet = {
@@ -5182,6 +6028,15 @@ function NutritionProduct_default(props) {
5182
6028
  resourceType: "NutritionProduct",
5183
6029
  ...props
5184
6030
  };
6031
+ if (!import_lodash71.default.isNil(props.category)) {
6032
+ if (!Array.isArray(props.category)) {
6033
+ props.category = [props.category];
6034
+ }
6035
+ resource.category = concept(props.category);
6036
+ }
6037
+ if (!import_lodash71.default.isNil(props.code)) {
6038
+ resource.code = concept(props.code);
6039
+ }
5185
6040
  if (!import_lodash71.default.isNil(props.manufacturer)) {
5186
6041
  if (!Array.isArray(props.manufacturer)) {
5187
6042
  props.manufacturer = [props.manufacturer];
@@ -5262,6 +6117,15 @@ function Observation_default(props) {
5262
6117
  }
5263
6118
  resource.partOf = reference(props.partOf);
5264
6119
  }
6120
+ if (!import_lodash72.default.isNil(props.category)) {
6121
+ if (!Array.isArray(props.category)) {
6122
+ props.category = [props.category];
6123
+ }
6124
+ resource.category = concept(props.category);
6125
+ }
6126
+ if (!import_lodash72.default.isNil(props.code)) {
6127
+ resource.code = concept(props.code);
6128
+ }
5265
6129
  if (!import_lodash72.default.isNil(props.subject)) {
5266
6130
  resource.subject = reference(props.subject);
5267
6131
  }
@@ -5288,6 +6152,21 @@ function Observation_default(props) {
5288
6152
  delete resource.value;
5289
6153
  composite(resource, "value", props.value);
5290
6154
  }
6155
+ if (!import_lodash72.default.isNil(props.dataAbsentReason)) {
6156
+ resource.dataAbsentReason = concept(props.dataAbsentReason);
6157
+ }
6158
+ if (!import_lodash72.default.isNil(props.interpretation)) {
6159
+ if (!Array.isArray(props.interpretation)) {
6160
+ props.interpretation = [props.interpretation];
6161
+ }
6162
+ resource.interpretation = concept(props.interpretation);
6163
+ }
6164
+ if (!import_lodash72.default.isNil(props.bodySite)) {
6165
+ resource.bodySite = concept(props.bodySite);
6166
+ }
6167
+ if (!import_lodash72.default.isNil(props.method)) {
6168
+ resource.method = concept(props.method);
6169
+ }
5291
6170
  if (!import_lodash72.default.isNil(props.specimen)) {
5292
6171
  resource.specimen = reference(props.specimen);
5293
6172
  }
@@ -5342,12 +6221,24 @@ function ObservationDefinition_default(props) {
5342
6221
  resourceType: "ObservationDefinition",
5343
6222
  ...props
5344
6223
  };
6224
+ if (!import_lodash73.default.isNil(props.category)) {
6225
+ if (!Array.isArray(props.category)) {
6226
+ props.category = [props.category];
6227
+ }
6228
+ resource.category = concept(props.category);
6229
+ }
6230
+ if (!import_lodash73.default.isNil(props.code)) {
6231
+ resource.code = concept(props.code);
6232
+ }
5345
6233
  if (!import_lodash73.default.isNil(props.identifier)) {
5346
6234
  if (!Array.isArray(props.identifier)) {
5347
6235
  props.identifier = [props.identifier];
5348
6236
  }
5349
6237
  resource.identifier = identifier(props.identifier);
5350
6238
  }
6239
+ if (!import_lodash73.default.isNil(props.method)) {
6240
+ resource.method = concept(props.method);
6241
+ }
5351
6242
  if (!import_lodash73.default.isNil(props.quantitativeDetails)) {
5352
6243
  let src = props.quantitativeDetails;
5353
6244
  let _quantitativeDetails = {
@@ -5396,6 +6287,12 @@ function Organization_default(props) {
5396
6287
  }
5397
6288
  resource.identifier = identifier(props.identifier);
5398
6289
  }
6290
+ if (!import_lodash74.default.isNil(props.type)) {
6291
+ if (!Array.isArray(props.type)) {
6292
+ props.type = [props.type];
6293
+ }
6294
+ resource.type = concept(props.type);
6295
+ }
5399
6296
  if (!import_lodash74.default.isNil(props.partOf)) {
5400
6297
  resource.partOf = reference(props.partOf);
5401
6298
  }
@@ -5446,6 +6343,18 @@ function OrganizationAffiliation_default(props) {
5446
6343
  }
5447
6344
  resource.network = reference(props.network);
5448
6345
  }
6346
+ if (!import_lodash75.default.isNil(props.code)) {
6347
+ if (!Array.isArray(props.code)) {
6348
+ props.code = [props.code];
6349
+ }
6350
+ resource.code = concept(props.code);
6351
+ }
6352
+ if (!import_lodash75.default.isNil(props.specialty)) {
6353
+ if (!Array.isArray(props.specialty)) {
6354
+ props.specialty = [props.specialty];
6355
+ }
6356
+ resource.specialty = concept(props.specialty);
6357
+ }
5449
6358
  if (!import_lodash75.default.isNil(props.location)) {
5450
6359
  if (!Array.isArray(props.location)) {
5451
6360
  props.location = [props.location];
@@ -5480,12 +6389,18 @@ function PackagedProductDefinition_default(props) {
5480
6389
  }
5481
6390
  resource.identifier = identifier(props.identifier);
5482
6391
  }
6392
+ if (!import_lodash76.default.isNil(props.type)) {
6393
+ resource.type = concept(props.type);
6394
+ }
5483
6395
  if (!import_lodash76.default.isNil(props.packageFor)) {
5484
6396
  if (!Array.isArray(props.packageFor)) {
5485
6397
  props.packageFor = [props.packageFor];
5486
6398
  }
5487
6399
  resource.packageFor = reference(props.packageFor);
5488
6400
  }
6401
+ if (!import_lodash76.default.isNil(props.status)) {
6402
+ resource.status = concept(props.status);
6403
+ }
5489
6404
  if (!import_lodash76.default.isNil(props.legalStatusOfSupply)) {
5490
6405
  let src = props.legalStatusOfSupply;
5491
6406
  if (!Array.isArray(src)) {
@@ -5499,6 +6414,12 @@ function PackagedProductDefinition_default(props) {
5499
6414
  resource.legalStatusOfSupply.push(_legalStatusOfSupply);
5500
6415
  }
5501
6416
  }
6417
+ if (!import_lodash76.default.isNil(props.characteristic)) {
6418
+ if (!Array.isArray(props.characteristic)) {
6419
+ props.characteristic = [props.characteristic];
6420
+ }
6421
+ resource.characteristic = concept(props.characteristic);
6422
+ }
5502
6423
  if (!import_lodash76.default.isNil(props.manufacturer)) {
5503
6424
  if (!Array.isArray(props.manufacturer)) {
5504
6425
  props.manufacturer = [props.manufacturer];
@@ -5532,6 +6453,9 @@ function Patient_default(props) {
5532
6453
  delete resource.deceased;
5533
6454
  composite(resource, "deceased", props.deceased);
5534
6455
  }
6456
+ if (!import_lodash77.default.isNil(props.maritalStatus)) {
6457
+ resource.maritalStatus = concept(props.maritalStatus);
6458
+ }
5535
6459
  if (!import_lodash77.default.isNil(props.multipleBirth)) {
5536
6460
  delete resource.multipleBirth;
5537
6461
  composite(resource, "multipleBirth", props.multipleBirth);
@@ -5618,6 +6542,9 @@ function PaymentNotice_default(props) {
5618
6542
  if (!import_lodash78.default.isNil(props.recipient)) {
5619
6543
  resource.recipient = reference(props.recipient);
5620
6544
  }
6545
+ if (!import_lodash78.default.isNil(props.paymentStatus)) {
6546
+ resource.paymentStatus = concept(props.paymentStatus);
6547
+ }
5621
6548
  return resource;
5622
6549
  }
5623
6550
 
@@ -5659,6 +6586,9 @@ function PaymentReconciliation_default(props) {
5659
6586
  resource.detail.push(_detail);
5660
6587
  }
5661
6588
  }
6589
+ if (!import_lodash79.default.isNil(props.formCode)) {
6590
+ resource.formCode = concept(props.formCode);
6591
+ }
5662
6592
  if (!import_lodash79.default.isNil(props.processNote)) {
5663
6593
  let src = props.processNote;
5664
6594
  if (!Array.isArray(src)) {
@@ -5720,10 +6650,25 @@ function PlanDefinition_default(props) {
5720
6650
  }
5721
6651
  resource.identifier = identifier(props.identifier);
5722
6652
  }
6653
+ if (!import_lodash81.default.isNil(props.type)) {
6654
+ resource.type = concept(props.type);
6655
+ }
5723
6656
  if (!import_lodash81.default.isNil(props.subject)) {
5724
6657
  delete resource.subject;
5725
6658
  composite(resource, "subject", props.subject);
5726
6659
  }
6660
+ if (!import_lodash81.default.isNil(props.jurisdiction)) {
6661
+ if (!Array.isArray(props.jurisdiction)) {
6662
+ props.jurisdiction = [props.jurisdiction];
6663
+ }
6664
+ resource.jurisdiction = concept(props.jurisdiction);
6665
+ }
6666
+ if (!import_lodash81.default.isNil(props.topic)) {
6667
+ if (!Array.isArray(props.topic)) {
6668
+ props.topic = [props.topic];
6669
+ }
6670
+ resource.topic = concept(props.topic);
6671
+ }
5727
6672
  if (!import_lodash81.default.isNil(props.goal)) {
5728
6673
  let src = props.goal;
5729
6674
  if (!Array.isArray(src)) {
@@ -5779,6 +6724,12 @@ function Practitioner_default(props) {
5779
6724
  resource.qualification.push(_qualification);
5780
6725
  }
5781
6726
  }
6727
+ if (!import_lodash82.default.isNil(props.communication)) {
6728
+ if (!Array.isArray(props.communication)) {
6729
+ props.communication = [props.communication];
6730
+ }
6731
+ resource.communication = concept(props.communication);
6732
+ }
5782
6733
  return resource;
5783
6734
  }
5784
6735
 
@@ -5801,6 +6752,18 @@ function PractitionerRole_default(props) {
5801
6752
  if (!import_lodash83.default.isNil(props.organization)) {
5802
6753
  resource.organization = reference(props.organization);
5803
6754
  }
6755
+ if (!import_lodash83.default.isNil(props.code)) {
6756
+ if (!Array.isArray(props.code)) {
6757
+ props.code = [props.code];
6758
+ }
6759
+ resource.code = concept(props.code);
6760
+ }
6761
+ if (!import_lodash83.default.isNil(props.specialty)) {
6762
+ if (!Array.isArray(props.specialty)) {
6763
+ props.specialty = [props.specialty];
6764
+ }
6765
+ resource.specialty = concept(props.specialty);
6766
+ }
5804
6767
  if (!import_lodash83.default.isNil(props.location)) {
5805
6768
  if (!Array.isArray(props.location)) {
5806
6769
  props.location = [props.location];
@@ -5873,6 +6836,15 @@ function Procedure_default(props) {
5873
6836
  }
5874
6837
  resource.partOf = reference(props.partOf);
5875
6838
  }
6839
+ if (!import_lodash84.default.isNil(props.statusReason)) {
6840
+ resource.statusReason = concept(props.statusReason);
6841
+ }
6842
+ if (!import_lodash84.default.isNil(props.category)) {
6843
+ resource.category = concept(props.category);
6844
+ }
6845
+ if (!import_lodash84.default.isNil(props.code)) {
6846
+ resource.code = concept(props.code);
6847
+ }
5876
6848
  if (!import_lodash84.default.isNil(props.subject)) {
5877
6849
  resource.subject = reference(props.subject);
5878
6850
  }
@@ -5905,24 +6877,51 @@ function Procedure_default(props) {
5905
6877
  if (!import_lodash84.default.isNil(props.location)) {
5906
6878
  resource.location = reference(props.location);
5907
6879
  }
6880
+ if (!import_lodash84.default.isNil(props.reasonCode)) {
6881
+ if (!Array.isArray(props.reasonCode)) {
6882
+ props.reasonCode = [props.reasonCode];
6883
+ }
6884
+ resource.reasonCode = concept(props.reasonCode);
6885
+ }
5908
6886
  if (!import_lodash84.default.isNil(props.reasonReference)) {
5909
6887
  if (!Array.isArray(props.reasonReference)) {
5910
6888
  props.reasonReference = [props.reasonReference];
5911
6889
  }
5912
6890
  resource.reasonReference = reference(props.reasonReference);
5913
6891
  }
6892
+ if (!import_lodash84.default.isNil(props.bodySite)) {
6893
+ if (!Array.isArray(props.bodySite)) {
6894
+ props.bodySite = [props.bodySite];
6895
+ }
6896
+ resource.bodySite = concept(props.bodySite);
6897
+ }
6898
+ if (!import_lodash84.default.isNil(props.outcome)) {
6899
+ resource.outcome = concept(props.outcome);
6900
+ }
5914
6901
  if (!import_lodash84.default.isNil(props.report)) {
5915
6902
  if (!Array.isArray(props.report)) {
5916
6903
  props.report = [props.report];
5917
6904
  }
5918
6905
  resource.report = reference(props.report);
5919
6906
  }
6907
+ if (!import_lodash84.default.isNil(props.complication)) {
6908
+ if (!Array.isArray(props.complication)) {
6909
+ props.complication = [props.complication];
6910
+ }
6911
+ resource.complication = concept(props.complication);
6912
+ }
5920
6913
  if (!import_lodash84.default.isNil(props.complicationDetail)) {
5921
6914
  if (!Array.isArray(props.complicationDetail)) {
5922
6915
  props.complicationDetail = [props.complicationDetail];
5923
6916
  }
5924
6917
  resource.complicationDetail = reference(props.complicationDetail);
5925
6918
  }
6919
+ if (!import_lodash84.default.isNil(props.followUp)) {
6920
+ if (!Array.isArray(props.followUp)) {
6921
+ props.followUp = [props.followUp];
6922
+ }
6923
+ resource.followUp = concept(props.followUp);
6924
+ }
5926
6925
  if (!import_lodash84.default.isNil(props.focalDevice)) {
5927
6926
  let src = props.focalDevice;
5928
6927
  if (!Array.isArray(src)) {
@@ -5942,6 +6941,12 @@ function Procedure_default(props) {
5942
6941
  }
5943
6942
  resource.usedReference = reference(props.usedReference);
5944
6943
  }
6944
+ if (!import_lodash84.default.isNil(props.usedCode)) {
6945
+ if (!Array.isArray(props.usedCode)) {
6946
+ props.usedCode = [props.usedCode];
6947
+ }
6948
+ resource.usedCode = concept(props.usedCode);
6949
+ }
5945
6950
  return resource;
5946
6951
  }
5947
6952
 
@@ -5958,6 +6963,12 @@ function Questionnaire_default(props) {
5958
6963
  }
5959
6964
  resource.identifier = identifier(props.identifier);
5960
6965
  }
6966
+ if (!import_lodash85.default.isNil(props.jurisdiction)) {
6967
+ if (!Array.isArray(props.jurisdiction)) {
6968
+ props.jurisdiction = [props.jurisdiction];
6969
+ }
6970
+ resource.jurisdiction = concept(props.jurisdiction);
6971
+ }
5961
6972
  if (!import_lodash85.default.isNil(props.item)) {
5962
6973
  let src = props.item;
5963
6974
  if (!Array.isArray(src)) {
@@ -6043,6 +7054,27 @@ function RegulatedAuthorization_default(props) {
6043
7054
  }
6044
7055
  resource.subject = reference(props.subject);
6045
7056
  }
7057
+ if (!import_lodash87.default.isNil(props.type)) {
7058
+ resource.type = concept(props.type);
7059
+ }
7060
+ if (!import_lodash87.default.isNil(props.region)) {
7061
+ if (!Array.isArray(props.region)) {
7062
+ props.region = [props.region];
7063
+ }
7064
+ resource.region = concept(props.region);
7065
+ }
7066
+ if (!import_lodash87.default.isNil(props.status)) {
7067
+ resource.status = concept(props.status);
7068
+ }
7069
+ if (!import_lodash87.default.isNil(props.intendedUse)) {
7070
+ resource.intendedUse = concept(props.intendedUse);
7071
+ }
7072
+ if (!import_lodash87.default.isNil(props.basis)) {
7073
+ if (!Array.isArray(props.basis)) {
7074
+ props.basis = [props.basis];
7075
+ }
7076
+ resource.basis = concept(props.basis);
7077
+ }
6046
7078
  if (!import_lodash87.default.isNil(props.holder)) {
6047
7079
  resource.holder = reference(props.holder);
6048
7080
  }
@@ -6075,6 +7107,12 @@ function RelatedPerson_default(props) {
6075
7107
  if (!import_lodash88.default.isNil(props.patient)) {
6076
7108
  resource.patient = reference(props.patient);
6077
7109
  }
7110
+ if (!import_lodash88.default.isNil(props.relationship)) {
7111
+ if (!Array.isArray(props.relationship)) {
7112
+ props.relationship = [props.relationship];
7113
+ }
7114
+ resource.relationship = concept(props.relationship);
7115
+ }
6078
7116
  if (!import_lodash88.default.isNil(props.communication)) {
6079
7117
  let src = props.communication;
6080
7118
  if (!Array.isArray(src)) {
@@ -6119,6 +7157,9 @@ function RequestGroup_default(props) {
6119
7157
  if (!import_lodash89.default.isNil(props.groupIdentifier)) {
6120
7158
  resource.groupIdentifier = identifier(props.groupIdentifier);
6121
7159
  }
7160
+ if (!import_lodash89.default.isNil(props.code)) {
7161
+ resource.code = concept(props.code);
7162
+ }
6122
7163
  if (!import_lodash89.default.isNil(props.subject)) {
6123
7164
  resource.subject = reference(props.subject);
6124
7165
  }
@@ -6128,6 +7169,12 @@ function RequestGroup_default(props) {
6128
7169
  if (!import_lodash89.default.isNil(props.author)) {
6129
7170
  resource.author = reference(props.author);
6130
7171
  }
7172
+ if (!import_lodash89.default.isNil(props.reasonCode)) {
7173
+ if (!Array.isArray(props.reasonCode)) {
7174
+ props.reasonCode = [props.reasonCode];
7175
+ }
7176
+ resource.reasonCode = concept(props.reasonCode);
7177
+ }
6131
7178
  if (!import_lodash89.default.isNil(props.reasonReference)) {
6132
7179
  if (!Array.isArray(props.reasonReference)) {
6133
7180
  props.reasonReference = [props.reasonReference];
@@ -6167,6 +7214,18 @@ function ResearchDefinition_default(props) {
6167
7214
  delete resource.subject;
6168
7215
  composite(resource, "subject", props.subject);
6169
7216
  }
7217
+ if (!import_lodash90.default.isNil(props.jurisdiction)) {
7218
+ if (!Array.isArray(props.jurisdiction)) {
7219
+ props.jurisdiction = [props.jurisdiction];
7220
+ }
7221
+ resource.jurisdiction = concept(props.jurisdiction);
7222
+ }
7223
+ if (!import_lodash90.default.isNil(props.topic)) {
7224
+ if (!Array.isArray(props.topic)) {
7225
+ props.topic = [props.topic];
7226
+ }
7227
+ resource.topic = concept(props.topic);
7228
+ }
6170
7229
  if (!import_lodash90.default.isNil(props.population)) {
6171
7230
  resource.population = reference(props.population);
6172
7231
  }
@@ -6199,6 +7258,18 @@ function ResearchElementDefinition_default(props) {
6199
7258
  delete resource.subject;
6200
7259
  composite(resource, "subject", props.subject);
6201
7260
  }
7261
+ if (!import_lodash91.default.isNil(props.jurisdiction)) {
7262
+ if (!Array.isArray(props.jurisdiction)) {
7263
+ props.jurisdiction = [props.jurisdiction];
7264
+ }
7265
+ resource.jurisdiction = concept(props.jurisdiction);
7266
+ }
7267
+ if (!import_lodash91.default.isNil(props.topic)) {
7268
+ if (!Array.isArray(props.topic)) {
7269
+ props.topic = [props.topic];
7270
+ }
7271
+ resource.topic = concept(props.topic);
7272
+ }
6202
7273
  if (!import_lodash91.default.isNil(props.characteristic)) {
6203
7274
  let src = props.characteristic;
6204
7275
  if (!Array.isArray(src)) {
@@ -6240,6 +7311,42 @@ function ResearchStudy_default(props) {
6240
7311
  }
6241
7312
  resource.partOf = reference(props.partOf);
6242
7313
  }
7314
+ if (!import_lodash92.default.isNil(props.primaryPurposeType)) {
7315
+ resource.primaryPurposeType = concept(props.primaryPurposeType);
7316
+ }
7317
+ if (!import_lodash92.default.isNil(props.phase)) {
7318
+ resource.phase = concept(props.phase);
7319
+ }
7320
+ if (!import_lodash92.default.isNil(props.category)) {
7321
+ if (!Array.isArray(props.category)) {
7322
+ props.category = [props.category];
7323
+ }
7324
+ resource.category = concept(props.category);
7325
+ }
7326
+ if (!import_lodash92.default.isNil(props.focus)) {
7327
+ if (!Array.isArray(props.focus)) {
7328
+ props.focus = [props.focus];
7329
+ }
7330
+ resource.focus = concept(props.focus);
7331
+ }
7332
+ if (!import_lodash92.default.isNil(props.condition)) {
7333
+ if (!Array.isArray(props.condition)) {
7334
+ props.condition = [props.condition];
7335
+ }
7336
+ resource.condition = concept(props.condition);
7337
+ }
7338
+ if (!import_lodash92.default.isNil(props.keyword)) {
7339
+ if (!Array.isArray(props.keyword)) {
7340
+ props.keyword = [props.keyword];
7341
+ }
7342
+ resource.keyword = concept(props.keyword);
7343
+ }
7344
+ if (!import_lodash92.default.isNil(props.location)) {
7345
+ if (!Array.isArray(props.location)) {
7346
+ props.location = [props.location];
7347
+ }
7348
+ resource.location = concept(props.location);
7349
+ }
6243
7350
  if (!import_lodash92.default.isNil(props.enrollment)) {
6244
7351
  if (!Array.isArray(props.enrollment)) {
6245
7352
  props.enrollment = [props.enrollment];
@@ -6258,6 +7365,9 @@ function ResearchStudy_default(props) {
6258
7365
  }
6259
7366
  resource.site = reference(props.site);
6260
7367
  }
7368
+ if (!import_lodash92.default.isNil(props.reasonStopped)) {
7369
+ resource.reasonStopped = concept(props.reasonStopped);
7370
+ }
6261
7371
  if (!import_lodash92.default.isNil(props.arm)) {
6262
7372
  let src = props.arm;
6263
7373
  if (!Array.isArray(src)) {
@@ -6331,6 +7441,12 @@ function RiskAssessment_default(props) {
6331
7441
  if (!import_lodash94.default.isNil(props.parent)) {
6332
7442
  resource.parent = reference(props.parent);
6333
7443
  }
7444
+ if (!import_lodash94.default.isNil(props.method)) {
7445
+ resource.method = concept(props.method);
7446
+ }
7447
+ if (!import_lodash94.default.isNil(props.code)) {
7448
+ resource.code = concept(props.code);
7449
+ }
6334
7450
  if (!import_lodash94.default.isNil(props.subject)) {
6335
7451
  resource.subject = reference(props.subject);
6336
7452
  }
@@ -6347,6 +7463,12 @@ function RiskAssessment_default(props) {
6347
7463
  if (!import_lodash94.default.isNil(props.performer)) {
6348
7464
  resource.performer = reference(props.performer);
6349
7465
  }
7466
+ if (!import_lodash94.default.isNil(props.reasonCode)) {
7467
+ if (!Array.isArray(props.reasonCode)) {
7468
+ props.reasonCode = [props.reasonCode];
7469
+ }
7470
+ resource.reasonCode = concept(props.reasonCode);
7471
+ }
6350
7472
  if (!import_lodash94.default.isNil(props.reasonReference)) {
6351
7473
  if (!Array.isArray(props.reasonReference)) {
6352
7474
  props.reasonReference = [props.reasonReference];
@@ -6388,6 +7510,24 @@ function Schedule_default(props) {
6388
7510
  }
6389
7511
  resource.identifier = identifier(props.identifier);
6390
7512
  }
7513
+ if (!import_lodash95.default.isNil(props.serviceCategory)) {
7514
+ if (!Array.isArray(props.serviceCategory)) {
7515
+ props.serviceCategory = [props.serviceCategory];
7516
+ }
7517
+ resource.serviceCategory = concept(props.serviceCategory);
7518
+ }
7519
+ if (!import_lodash95.default.isNil(props.serviceType)) {
7520
+ if (!Array.isArray(props.serviceType)) {
7521
+ props.serviceType = [props.serviceType];
7522
+ }
7523
+ resource.serviceType = concept(props.serviceType);
7524
+ }
7525
+ if (!import_lodash95.default.isNil(props.specialty)) {
7526
+ if (!Array.isArray(props.specialty)) {
7527
+ props.specialty = [props.specialty];
7528
+ }
7529
+ resource.specialty = concept(props.specialty);
7530
+ }
6391
7531
  if (!import_lodash95.default.isNil(props.actor)) {
6392
7532
  if (!Array.isArray(props.actor)) {
6393
7533
  props.actor = [props.actor];
@@ -6425,6 +7565,21 @@ function ServiceRequest_default(props) {
6425
7565
  if (!import_lodash96.default.isNil(props.requisition)) {
6426
7566
  resource.requisition = identifier(props.requisition);
6427
7567
  }
7568
+ if (!import_lodash96.default.isNil(props.category)) {
7569
+ if (!Array.isArray(props.category)) {
7570
+ props.category = [props.category];
7571
+ }
7572
+ resource.category = concept(props.category);
7573
+ }
7574
+ if (!import_lodash96.default.isNil(props.code)) {
7575
+ resource.code = concept(props.code);
7576
+ }
7577
+ if (!import_lodash96.default.isNil(props.orderDetail)) {
7578
+ if (!Array.isArray(props.orderDetail)) {
7579
+ props.orderDetail = [props.orderDetail];
7580
+ }
7581
+ resource.orderDetail = concept(props.orderDetail);
7582
+ }
6428
7583
  if (!import_lodash96.default.isNil(props.quantity)) {
6429
7584
  delete resource.quantity;
6430
7585
  composite(resource, "quantity", props.quantity);
@@ -6446,18 +7601,33 @@ function ServiceRequest_default(props) {
6446
7601
  if (!import_lodash96.default.isNil(props.requester)) {
6447
7602
  resource.requester = reference(props.requester);
6448
7603
  }
7604
+ if (!import_lodash96.default.isNil(props.performerType)) {
7605
+ resource.performerType = concept(props.performerType);
7606
+ }
6449
7607
  if (!import_lodash96.default.isNil(props.performer)) {
6450
7608
  if (!Array.isArray(props.performer)) {
6451
7609
  props.performer = [props.performer];
6452
7610
  }
6453
7611
  resource.performer = reference(props.performer);
6454
7612
  }
7613
+ if (!import_lodash96.default.isNil(props.locationCode)) {
7614
+ if (!Array.isArray(props.locationCode)) {
7615
+ props.locationCode = [props.locationCode];
7616
+ }
7617
+ resource.locationCode = concept(props.locationCode);
7618
+ }
6455
7619
  if (!import_lodash96.default.isNil(props.locationReference)) {
6456
7620
  if (!Array.isArray(props.locationReference)) {
6457
7621
  props.locationReference = [props.locationReference];
6458
7622
  }
6459
7623
  resource.locationReference = reference(props.locationReference);
6460
7624
  }
7625
+ if (!import_lodash96.default.isNil(props.reasonCode)) {
7626
+ if (!Array.isArray(props.reasonCode)) {
7627
+ props.reasonCode = [props.reasonCode];
7628
+ }
7629
+ resource.reasonCode = concept(props.reasonCode);
7630
+ }
6461
7631
  if (!import_lodash96.default.isNil(props.reasonReference)) {
6462
7632
  if (!Array.isArray(props.reasonReference)) {
6463
7633
  props.reasonReference = [props.reasonReference];
@@ -6482,6 +7652,12 @@ function ServiceRequest_default(props) {
6482
7652
  }
6483
7653
  resource.specimen = reference(props.specimen);
6484
7654
  }
7655
+ if (!import_lodash96.default.isNil(props.bodySite)) {
7656
+ if (!Array.isArray(props.bodySite)) {
7657
+ props.bodySite = [props.bodySite];
7658
+ }
7659
+ resource.bodySite = concept(props.bodySite);
7660
+ }
6485
7661
  if (!import_lodash96.default.isNil(props.relevantHistory)) {
6486
7662
  if (!Array.isArray(props.relevantHistory)) {
6487
7663
  props.relevantHistory = [props.relevantHistory];
@@ -6504,6 +7680,27 @@ function Slot_default(props) {
6504
7680
  }
6505
7681
  resource.identifier = identifier(props.identifier);
6506
7682
  }
7683
+ if (!import_lodash97.default.isNil(props.serviceCategory)) {
7684
+ if (!Array.isArray(props.serviceCategory)) {
7685
+ props.serviceCategory = [props.serviceCategory];
7686
+ }
7687
+ resource.serviceCategory = concept(props.serviceCategory);
7688
+ }
7689
+ if (!import_lodash97.default.isNil(props.serviceType)) {
7690
+ if (!Array.isArray(props.serviceType)) {
7691
+ props.serviceType = [props.serviceType];
7692
+ }
7693
+ resource.serviceType = concept(props.serviceType);
7694
+ }
7695
+ if (!import_lodash97.default.isNil(props.specialty)) {
7696
+ if (!Array.isArray(props.specialty)) {
7697
+ props.specialty = [props.specialty];
7698
+ }
7699
+ resource.specialty = concept(props.specialty);
7700
+ }
7701
+ if (!import_lodash97.default.isNil(props.appointmentType)) {
7702
+ resource.appointmentType = concept(props.appointmentType);
7703
+ }
6507
7704
  if (!import_lodash97.default.isNil(props.schedule)) {
6508
7705
  resource.schedule = reference(props.schedule);
6509
7706
  }
@@ -6526,6 +7723,9 @@ function Specimen_default(props) {
6526
7723
  if (!import_lodash98.default.isNil(props.accessionIdentifier)) {
6527
7724
  resource.accessionIdentifier = identifier(props.accessionIdentifier);
6528
7725
  }
7726
+ if (!import_lodash98.default.isNil(props.type)) {
7727
+ resource.type = concept(props.type);
7728
+ }
6529
7729
  if (!import_lodash98.default.isNil(props.subject)) {
6530
7730
  resource.subject = reference(props.subject);
6531
7731
  }
@@ -6574,6 +7774,12 @@ function Specimen_default(props) {
6574
7774
  resource.container.push(_container);
6575
7775
  }
6576
7776
  }
7777
+ if (!import_lodash98.default.isNil(props.condition)) {
7778
+ if (!Array.isArray(props.condition)) {
7779
+ props.condition = [props.condition];
7780
+ }
7781
+ resource.condition = concept(props.condition);
7782
+ }
6577
7783
  return resource;
6578
7784
  }
6579
7785
 
@@ -6587,6 +7793,21 @@ function SpecimenDefinition_default(props) {
6587
7793
  if (!import_lodash99.default.isNil(props.identifier)) {
6588
7794
  resource.identifier = identifier(props.identifier);
6589
7795
  }
7796
+ if (!import_lodash99.default.isNil(props.typeCollected)) {
7797
+ resource.typeCollected = concept(props.typeCollected);
7798
+ }
7799
+ if (!import_lodash99.default.isNil(props.patientPreparation)) {
7800
+ if (!Array.isArray(props.patientPreparation)) {
7801
+ props.patientPreparation = [props.patientPreparation];
7802
+ }
7803
+ resource.patientPreparation = concept(props.patientPreparation);
7804
+ }
7805
+ if (!import_lodash99.default.isNil(props.collection)) {
7806
+ if (!Array.isArray(props.collection)) {
7807
+ props.collection = [props.collection];
7808
+ }
7809
+ resource.collection = concept(props.collection);
7810
+ }
6590
7811
  if (!import_lodash99.default.isNil(props.typeTested)) {
6591
7812
  let src = props.typeTested;
6592
7813
  if (!Array.isArray(src)) {
@@ -6616,6 +7837,15 @@ function Substance_default(props) {
6616
7837
  }
6617
7838
  resource.identifier = identifier(props.identifier);
6618
7839
  }
7840
+ if (!import_lodash100.default.isNil(props.category)) {
7841
+ if (!Array.isArray(props.category)) {
7842
+ props.category = [props.category];
7843
+ }
7844
+ resource.category = concept(props.category);
7845
+ }
7846
+ if (!import_lodash100.default.isNil(props.code)) {
7847
+ resource.code = concept(props.code);
7848
+ }
6619
7849
  if (!import_lodash100.default.isNil(props.instance)) {
6620
7850
  let src = props.instance;
6621
7851
  if (!Array.isArray(src)) {
@@ -6658,6 +7888,24 @@ function SubstanceDefinition_default(props) {
6658
7888
  }
6659
7889
  resource.identifier = identifier(props.identifier);
6660
7890
  }
7891
+ if (!import_lodash101.default.isNil(props.status)) {
7892
+ resource.status = concept(props.status);
7893
+ }
7894
+ if (!import_lodash101.default.isNil(props.classification)) {
7895
+ if (!Array.isArray(props.classification)) {
7896
+ props.classification = [props.classification];
7897
+ }
7898
+ resource.classification = concept(props.classification);
7899
+ }
7900
+ if (!import_lodash101.default.isNil(props.domain)) {
7901
+ resource.domain = concept(props.domain);
7902
+ }
7903
+ if (!import_lodash101.default.isNil(props.grade)) {
7904
+ if (!Array.isArray(props.grade)) {
7905
+ props.grade = [props.grade];
7906
+ }
7907
+ resource.grade = concept(props.grade);
7908
+ }
6661
7909
  if (!import_lodash101.default.isNil(props.informationSource)) {
6662
7910
  if (!Array.isArray(props.informationSource)) {
6663
7911
  props.informationSource = [props.informationSource];
@@ -6799,6 +8047,9 @@ function SupplyDelivery_default(props) {
6799
8047
  if (!import_lodash102.default.isNil(props.patient)) {
6800
8048
  resource.patient = reference(props.patient);
6801
8049
  }
8050
+ if (!import_lodash102.default.isNil(props.type)) {
8051
+ resource.type = concept(props.type);
8052
+ }
6802
8053
  if (!import_lodash102.default.isNil(props.suppliedItem)) {
6803
8054
  let src = props.suppliedItem;
6804
8055
  let _suppliedItem = {
@@ -6838,6 +8089,9 @@ function SupplyRequest_default(props) {
6838
8089
  }
6839
8090
  resource.identifier = identifier(props.identifier);
6840
8091
  }
8092
+ if (!import_lodash103.default.isNil(props.category)) {
8093
+ resource.category = concept(props.category);
8094
+ }
6841
8095
  if (!import_lodash103.default.isNil(props.item)) {
6842
8096
  delete resource.item;
6843
8097
  composite(resource, "item", props.item);
@@ -6868,6 +8122,12 @@ function SupplyRequest_default(props) {
6868
8122
  }
6869
8123
  resource.supplier = reference(props.supplier);
6870
8124
  }
8125
+ if (!import_lodash103.default.isNil(props.reasonCode)) {
8126
+ if (!Array.isArray(props.reasonCode)) {
8127
+ props.reasonCode = [props.reasonCode];
8128
+ }
8129
+ resource.reasonCode = concept(props.reasonCode);
8130
+ }
6871
8131
  if (!import_lodash103.default.isNil(props.reasonReference)) {
6872
8132
  if (!Array.isArray(props.reasonReference)) {
6873
8133
  props.reasonReference = [props.reasonReference];
@@ -6911,6 +8171,15 @@ function Task_default(props) {
6911
8171
  }
6912
8172
  resource.partOf = reference(props.partOf);
6913
8173
  }
8174
+ if (!import_lodash104.default.isNil(props.statusReason)) {
8175
+ resource.statusReason = concept(props.statusReason);
8176
+ }
8177
+ if (!import_lodash104.default.isNil(props.businessStatus)) {
8178
+ resource.businessStatus = concept(props.businessStatus);
8179
+ }
8180
+ if (!import_lodash104.default.isNil(props.code)) {
8181
+ resource.code = concept(props.code);
8182
+ }
6914
8183
  if (!import_lodash104.default.isNil(props.focus)) {
6915
8184
  resource.focus = reference(props.focus);
6916
8185
  }
@@ -6923,12 +8192,21 @@ function Task_default(props) {
6923
8192
  if (!import_lodash104.default.isNil(props.requester)) {
6924
8193
  resource.requester = reference(props.requester);
6925
8194
  }
8195
+ if (!import_lodash104.default.isNil(props.performerType)) {
8196
+ if (!Array.isArray(props.performerType)) {
8197
+ props.performerType = [props.performerType];
8198
+ }
8199
+ resource.performerType = concept(props.performerType);
8200
+ }
6926
8201
  if (!import_lodash104.default.isNil(props.owner)) {
6927
8202
  resource.owner = reference(props.owner);
6928
8203
  }
6929
8204
  if (!import_lodash104.default.isNil(props.location)) {
6930
8205
  resource.location = reference(props.location);
6931
8206
  }
8207
+ if (!import_lodash104.default.isNil(props.reasonCode)) {
8208
+ resource.reasonCode = concept(props.reasonCode);
8209
+ }
6932
8210
  if (!import_lodash104.default.isNil(props.reasonReference)) {
6933
8211
  resource.reasonReference = reference(props.reasonReference);
6934
8212
  }
@@ -7049,6 +8327,21 @@ function VerificationResult_default(props) {
7049
8327
  }
7050
8328
  resource.target = reference(props.target);
7051
8329
  }
8330
+ if (!import_lodash106.default.isNil(props.need)) {
8331
+ resource.need = concept(props.need);
8332
+ }
8333
+ if (!import_lodash106.default.isNil(props.validationType)) {
8334
+ resource.validationType = concept(props.validationType);
8335
+ }
8336
+ if (!import_lodash106.default.isNil(props.validationProcess)) {
8337
+ if (!Array.isArray(props.validationProcess)) {
8338
+ props.validationProcess = [props.validationProcess];
8339
+ }
8340
+ resource.validationProcess = concept(props.validationProcess);
8341
+ }
8342
+ if (!import_lodash106.default.isNil(props.failureAction)) {
8343
+ resource.failureAction = concept(props.failureAction);
8344
+ }
7052
8345
  if (!import_lodash106.default.isNil(props.primarySource)) {
7053
8346
  let src = props.primarySource;
7054
8347
  if (!Array.isArray(src)) {