@medplum/core 1.0.6 → 2.0.1

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.
@@ -721,6 +721,21 @@
721
721
  }
722
722
  return curr?.valueString;
723
723
  }
724
+ /**
725
+ * Returns an extension by extension URLs.
726
+ * @param resource The base resource.
727
+ * @param urls Array of extension URLs. Each entry represents a nested extension.
728
+ * @returns The extension object if found; undefined otherwise.
729
+ */
730
+ function getExtension(resource, ...urls) {
731
+ // Let curr be the current resource or extension. Extensions can be nested.
732
+ let curr = resource;
733
+ // For each of the urls, try to find a matching nested extension.
734
+ for (let i = 0; i < urls.length && curr; i++) {
735
+ curr = curr?.extension?.find((e) => e.url === urls[i]);
736
+ }
737
+ return curr;
738
+ }
724
739
  /**
725
740
  * FHIR JSON stringify.
726
741
  * Removes properties with empty string values.
@@ -1335,8 +1350,6 @@
1335
1350
  display: "Element",
1336
1351
  properties: {
1337
1352
  id: {
1338
- min: 0,
1339
- max: "1",
1340
1353
  type: [
1341
1354
  {
1342
1355
  code: "string"
@@ -1344,7 +1357,6 @@
1344
1357
  ]
1345
1358
  },
1346
1359
  extension: {
1347
- min: 0,
1348
1360
  max: "*",
1349
1361
  type: [
1350
1362
  {
@@ -1358,8 +1370,6 @@
1358
1370
  display: "BackboneElement",
1359
1371
  properties: {
1360
1372
  id: {
1361
- min: 0,
1362
- max: "1",
1363
1373
  type: [
1364
1374
  {
1365
1375
  code: "string"
@@ -1367,7 +1377,6 @@
1367
1377
  ]
1368
1378
  },
1369
1379
  extension: {
1370
- min: 0,
1371
1380
  max: "*",
1372
1381
  type: [
1373
1382
  {
@@ -1376,7 +1385,6 @@
1376
1385
  ]
1377
1386
  },
1378
1387
  modifierExtension: {
1379
- min: 0,
1380
1388
  max: "*",
1381
1389
  type: [
1382
1390
  {
@@ -1390,8 +1398,6 @@
1390
1398
  display: "Address",
1391
1399
  properties: {
1392
1400
  id: {
1393
- min: 0,
1394
- max: "1",
1395
1401
  type: [
1396
1402
  {
1397
1403
  code: "string"
@@ -1399,7 +1405,6 @@
1399
1405
  ]
1400
1406
  },
1401
1407
  extension: {
1402
- min: 0,
1403
1408
  max: "*",
1404
1409
  type: [
1405
1410
  {
@@ -1408,8 +1413,6 @@
1408
1413
  ]
1409
1414
  },
1410
1415
  use: {
1411
- min: 0,
1412
- max: "1",
1413
1416
  type: [
1414
1417
  {
1415
1418
  code: "code"
@@ -1417,8 +1420,6 @@
1417
1420
  ]
1418
1421
  },
1419
1422
  type: {
1420
- min: 0,
1421
- max: "1",
1422
1423
  type: [
1423
1424
  {
1424
1425
  code: "code"
@@ -1426,8 +1427,6 @@
1426
1427
  ]
1427
1428
  },
1428
1429
  text: {
1429
- min: 0,
1430
- max: "1",
1431
1430
  type: [
1432
1431
  {
1433
1432
  code: "string"
@@ -1435,7 +1434,6 @@
1435
1434
  ]
1436
1435
  },
1437
1436
  line: {
1438
- min: 0,
1439
1437
  max: "*",
1440
1438
  type: [
1441
1439
  {
@@ -1444,8 +1442,6 @@
1444
1442
  ]
1445
1443
  },
1446
1444
  city: {
1447
- min: 0,
1448
- max: "1",
1449
1445
  type: [
1450
1446
  {
1451
1447
  code: "string"
@@ -1453,8 +1449,6 @@
1453
1449
  ]
1454
1450
  },
1455
1451
  district: {
1456
- min: 0,
1457
- max: "1",
1458
1452
  type: [
1459
1453
  {
1460
1454
  code: "string"
@@ -1462,8 +1456,6 @@
1462
1456
  ]
1463
1457
  },
1464
1458
  state: {
1465
- min: 0,
1466
- max: "1",
1467
1459
  type: [
1468
1460
  {
1469
1461
  code: "string"
@@ -1471,8 +1463,6 @@
1471
1463
  ]
1472
1464
  },
1473
1465
  postalCode: {
1474
- min: 0,
1475
- max: "1",
1476
1466
  type: [
1477
1467
  {
1478
1468
  code: "string"
@@ -1480,8 +1470,6 @@
1480
1470
  ]
1481
1471
  },
1482
1472
  country: {
1483
- min: 0,
1484
- max: "1",
1485
1473
  type: [
1486
1474
  {
1487
1475
  code: "string"
@@ -1489,8 +1477,6 @@
1489
1477
  ]
1490
1478
  },
1491
1479
  period: {
1492
- min: 0,
1493
- max: "1",
1494
1480
  type: [
1495
1481
  {
1496
1482
  code: "Period"
@@ -1503,8 +1489,6 @@
1503
1489
  display: "Age",
1504
1490
  properties: {
1505
1491
  id: {
1506
- min: 0,
1507
- max: "1",
1508
1492
  type: [
1509
1493
  {
1510
1494
  code: "string"
@@ -1512,7 +1496,6 @@
1512
1496
  ]
1513
1497
  },
1514
1498
  extension: {
1515
- min: 0,
1516
1499
  max: "*",
1517
1500
  type: [
1518
1501
  {
@@ -1521,8 +1504,6 @@
1521
1504
  ]
1522
1505
  },
1523
1506
  value: {
1524
- min: 0,
1525
- max: "1",
1526
1507
  type: [
1527
1508
  {
1528
1509
  code: "decimal"
@@ -1530,8 +1511,6 @@
1530
1511
  ]
1531
1512
  },
1532
1513
  comparator: {
1533
- min: 0,
1534
- max: "1",
1535
1514
  type: [
1536
1515
  {
1537
1516
  code: "code"
@@ -1539,8 +1518,6 @@
1539
1518
  ]
1540
1519
  },
1541
1520
  unit: {
1542
- min: 0,
1543
- max: "1",
1544
1521
  type: [
1545
1522
  {
1546
1523
  code: "string"
@@ -1548,8 +1525,6 @@
1548
1525
  ]
1549
1526
  },
1550
1527
  system: {
1551
- min: 0,
1552
- max: "1",
1553
1528
  type: [
1554
1529
  {
1555
1530
  code: "uri"
@@ -1557,8 +1532,6 @@
1557
1532
  ]
1558
1533
  },
1559
1534
  code: {
1560
- min: 0,
1561
- max: "1",
1562
1535
  type: [
1563
1536
  {
1564
1537
  code: "code"
@@ -1571,8 +1544,6 @@
1571
1544
  display: "Annotation",
1572
1545
  properties: {
1573
1546
  id: {
1574
- min: 0,
1575
- max: "1",
1576
1547
  type: [
1577
1548
  {
1578
1549
  code: "string"
@@ -1580,7 +1551,6 @@
1580
1551
  ]
1581
1552
  },
1582
1553
  extension: {
1583
- min: 0,
1584
1554
  max: "*",
1585
1555
  type: [
1586
1556
  {
@@ -1589,8 +1559,6 @@
1589
1559
  ]
1590
1560
  },
1591
1561
  "author[x]": {
1592
- min: 0,
1593
- max: "1",
1594
1562
  type: [
1595
1563
  {
1596
1564
  code: "Reference",
@@ -1607,8 +1575,6 @@
1607
1575
  ]
1608
1576
  },
1609
1577
  time: {
1610
- min: 0,
1611
- max: "1",
1612
1578
  type: [
1613
1579
  {
1614
1580
  code: "dateTime"
@@ -1617,7 +1583,6 @@
1617
1583
  },
1618
1584
  text: {
1619
1585
  min: 1,
1620
- max: "1",
1621
1586
  type: [
1622
1587
  {
1623
1588
  code: "markdown"
@@ -1630,8 +1595,6 @@
1630
1595
  display: "Attachment",
1631
1596
  properties: {
1632
1597
  id: {
1633
- min: 0,
1634
- max: "1",
1635
1598
  type: [
1636
1599
  {
1637
1600
  code: "string"
@@ -1639,7 +1602,6 @@
1639
1602
  ]
1640
1603
  },
1641
1604
  extension: {
1642
- min: 0,
1643
1605
  max: "*",
1644
1606
  type: [
1645
1607
  {
@@ -1648,8 +1610,6 @@
1648
1610
  ]
1649
1611
  },
1650
1612
  contentType: {
1651
- min: 0,
1652
- max: "1",
1653
1613
  type: [
1654
1614
  {
1655
1615
  code: "code"
@@ -1657,8 +1617,6 @@
1657
1617
  ]
1658
1618
  },
1659
1619
  language: {
1660
- min: 0,
1661
- max: "1",
1662
1620
  type: [
1663
1621
  {
1664
1622
  code: "code"
@@ -1666,8 +1624,6 @@
1666
1624
  ]
1667
1625
  },
1668
1626
  data: {
1669
- min: 0,
1670
- max: "1",
1671
1627
  type: [
1672
1628
  {
1673
1629
  code: "base64Binary"
@@ -1675,8 +1631,6 @@
1675
1631
  ]
1676
1632
  },
1677
1633
  url: {
1678
- min: 0,
1679
- max: "1",
1680
1634
  type: [
1681
1635
  {
1682
1636
  code: "url"
@@ -1684,8 +1638,6 @@
1684
1638
  ]
1685
1639
  },
1686
1640
  size: {
1687
- min: 0,
1688
- max: "1",
1689
1641
  type: [
1690
1642
  {
1691
1643
  code: "unsignedInt"
@@ -1693,8 +1645,6 @@
1693
1645
  ]
1694
1646
  },
1695
1647
  hash: {
1696
- min: 0,
1697
- max: "1",
1698
1648
  type: [
1699
1649
  {
1700
1650
  code: "base64Binary"
@@ -1702,8 +1652,6 @@
1702
1652
  ]
1703
1653
  },
1704
1654
  title: {
1705
- min: 0,
1706
- max: "1",
1707
1655
  type: [
1708
1656
  {
1709
1657
  code: "string"
@@ -1711,8 +1659,6 @@
1711
1659
  ]
1712
1660
  },
1713
1661
  creation: {
1714
- min: 0,
1715
- max: "1",
1716
1662
  type: [
1717
1663
  {
1718
1664
  code: "dateTime"
@@ -1725,8 +1671,6 @@
1725
1671
  display: "CodeableConcept",
1726
1672
  properties: {
1727
1673
  id: {
1728
- min: 0,
1729
- max: "1",
1730
1674
  type: [
1731
1675
  {
1732
1676
  code: "string"
@@ -1734,7 +1678,6 @@
1734
1678
  ]
1735
1679
  },
1736
1680
  extension: {
1737
- min: 0,
1738
1681
  max: "*",
1739
1682
  type: [
1740
1683
  {
@@ -1743,7 +1686,6 @@
1743
1686
  ]
1744
1687
  },
1745
1688
  coding: {
1746
- min: 0,
1747
1689
  max: "*",
1748
1690
  type: [
1749
1691
  {
@@ -1752,8 +1694,6 @@
1752
1694
  ]
1753
1695
  },
1754
1696
  text: {
1755
- min: 0,
1756
- max: "1",
1757
1697
  type: [
1758
1698
  {
1759
1699
  code: "string"
@@ -1766,8 +1706,6 @@
1766
1706
  display: "Coding",
1767
1707
  properties: {
1768
1708
  id: {
1769
- min: 0,
1770
- max: "1",
1771
1709
  type: [
1772
1710
  {
1773
1711
  code: "string"
@@ -1775,7 +1713,6 @@
1775
1713
  ]
1776
1714
  },
1777
1715
  extension: {
1778
- min: 0,
1779
1716
  max: "*",
1780
1717
  type: [
1781
1718
  {
@@ -1784,8 +1721,6 @@
1784
1721
  ]
1785
1722
  },
1786
1723
  system: {
1787
- min: 0,
1788
- max: "1",
1789
1724
  type: [
1790
1725
  {
1791
1726
  code: "uri"
@@ -1793,8 +1728,6 @@
1793
1728
  ]
1794
1729
  },
1795
1730
  version: {
1796
- min: 0,
1797
- max: "1",
1798
1731
  type: [
1799
1732
  {
1800
1733
  code: "string"
@@ -1802,8 +1735,6 @@
1802
1735
  ]
1803
1736
  },
1804
1737
  code: {
1805
- min: 0,
1806
- max: "1",
1807
1738
  type: [
1808
1739
  {
1809
1740
  code: "code"
@@ -1811,8 +1742,6 @@
1811
1742
  ]
1812
1743
  },
1813
1744
  display: {
1814
- min: 0,
1815
- max: "1",
1816
1745
  type: [
1817
1746
  {
1818
1747
  code: "string"
@@ -1820,8 +1749,6 @@
1820
1749
  ]
1821
1750
  },
1822
1751
  userSelected: {
1823
- min: 0,
1824
- max: "1",
1825
1752
  type: [
1826
1753
  {
1827
1754
  code: "boolean"
@@ -1834,8 +1761,6 @@
1834
1761
  display: "ContactDetail",
1835
1762
  properties: {
1836
1763
  id: {
1837
- min: 0,
1838
- max: "1",
1839
1764
  type: [
1840
1765
  {
1841
1766
  code: "string"
@@ -1843,7 +1768,6 @@
1843
1768
  ]
1844
1769
  },
1845
1770
  extension: {
1846
- min: 0,
1847
1771
  max: "*",
1848
1772
  type: [
1849
1773
  {
@@ -1852,8 +1776,6 @@
1852
1776
  ]
1853
1777
  },
1854
1778
  name: {
1855
- min: 0,
1856
- max: "1",
1857
1779
  type: [
1858
1780
  {
1859
1781
  code: "string"
@@ -1861,7 +1783,6 @@
1861
1783
  ]
1862
1784
  },
1863
1785
  telecom: {
1864
- min: 0,
1865
1786
  max: "*",
1866
1787
  type: [
1867
1788
  {
@@ -1875,8 +1796,6 @@
1875
1796
  display: "ContactPoint",
1876
1797
  properties: {
1877
1798
  id: {
1878
- min: 0,
1879
- max: "1",
1880
1799
  type: [
1881
1800
  {
1882
1801
  code: "string"
@@ -1884,7 +1803,6 @@
1884
1803
  ]
1885
1804
  },
1886
1805
  extension: {
1887
- min: 0,
1888
1806
  max: "*",
1889
1807
  type: [
1890
1808
  {
@@ -1893,8 +1811,6 @@
1893
1811
  ]
1894
1812
  },
1895
1813
  system: {
1896
- min: 0,
1897
- max: "1",
1898
1814
  type: [
1899
1815
  {
1900
1816
  code: "code"
@@ -1902,8 +1818,6 @@
1902
1818
  ]
1903
1819
  },
1904
1820
  value: {
1905
- min: 0,
1906
- max: "1",
1907
1821
  type: [
1908
1822
  {
1909
1823
  code: "string"
@@ -1911,8 +1825,6 @@
1911
1825
  ]
1912
1826
  },
1913
1827
  use: {
1914
- min: 0,
1915
- max: "1",
1916
1828
  type: [
1917
1829
  {
1918
1830
  code: "code"
@@ -1920,8 +1832,6 @@
1920
1832
  ]
1921
1833
  },
1922
1834
  rank: {
1923
- min: 0,
1924
- max: "1",
1925
1835
  type: [
1926
1836
  {
1927
1837
  code: "positiveInt"
@@ -1929,8 +1839,6 @@
1929
1839
  ]
1930
1840
  },
1931
1841
  period: {
1932
- min: 0,
1933
- max: "1",
1934
1842
  type: [
1935
1843
  {
1936
1844
  code: "Period"
@@ -1943,8 +1851,6 @@
1943
1851
  display: "Contributor",
1944
1852
  properties: {
1945
1853
  id: {
1946
- min: 0,
1947
- max: "1",
1948
1854
  type: [
1949
1855
  {
1950
1856
  code: "string"
@@ -1952,7 +1858,6 @@
1952
1858
  ]
1953
1859
  },
1954
1860
  extension: {
1955
- min: 0,
1956
1861
  max: "*",
1957
1862
  type: [
1958
1863
  {
@@ -1962,7 +1867,6 @@
1962
1867
  },
1963
1868
  type: {
1964
1869
  min: 1,
1965
- max: "1",
1966
1870
  type: [
1967
1871
  {
1968
1872
  code: "code"
@@ -1971,7 +1875,6 @@
1971
1875
  },
1972
1876
  name: {
1973
1877
  min: 1,
1974
- max: "1",
1975
1878
  type: [
1976
1879
  {
1977
1880
  code: "string"
@@ -1979,7 +1882,6 @@
1979
1882
  ]
1980
1883
  },
1981
1884
  contact: {
1982
- min: 0,
1983
1885
  max: "*",
1984
1886
  type: [
1985
1887
  {
@@ -1993,8 +1895,6 @@
1993
1895
  display: "Count",
1994
1896
  properties: {
1995
1897
  id: {
1996
- min: 0,
1997
- max: "1",
1998
1898
  type: [
1999
1899
  {
2000
1900
  code: "string"
@@ -2002,7 +1902,6 @@
2002
1902
  ]
2003
1903
  },
2004
1904
  extension: {
2005
- min: 0,
2006
1905
  max: "*",
2007
1906
  type: [
2008
1907
  {
@@ -2011,8 +1910,6 @@
2011
1910
  ]
2012
1911
  },
2013
1912
  value: {
2014
- min: 0,
2015
- max: "1",
2016
1913
  type: [
2017
1914
  {
2018
1915
  code: "decimal"
@@ -2020,8 +1917,6 @@
2020
1917
  ]
2021
1918
  },
2022
1919
  comparator: {
2023
- min: 0,
2024
- max: "1",
2025
1920
  type: [
2026
1921
  {
2027
1922
  code: "code"
@@ -2029,8 +1924,6 @@
2029
1924
  ]
2030
1925
  },
2031
1926
  unit: {
2032
- min: 0,
2033
- max: "1",
2034
1927
  type: [
2035
1928
  {
2036
1929
  code: "string"
@@ -2038,8 +1931,6 @@
2038
1931
  ]
2039
1932
  },
2040
1933
  system: {
2041
- min: 0,
2042
- max: "1",
2043
1934
  type: [
2044
1935
  {
2045
1936
  code: "uri"
@@ -2047,8 +1938,6 @@
2047
1938
  ]
2048
1939
  },
2049
1940
  code: {
2050
- min: 0,
2051
- max: "1",
2052
1941
  type: [
2053
1942
  {
2054
1943
  code: "code"
@@ -2061,8 +1950,6 @@
2061
1950
  display: "DataRequirement",
2062
1951
  properties: {
2063
1952
  id: {
2064
- min: 0,
2065
- max: "1",
2066
1953
  type: [
2067
1954
  {
2068
1955
  code: "string"
@@ -2070,7 +1957,6 @@
2070
1957
  ]
2071
1958
  },
2072
1959
  extension: {
2073
- min: 0,
2074
1960
  max: "*",
2075
1961
  type: [
2076
1962
  {
@@ -2080,7 +1966,6 @@
2080
1966
  },
2081
1967
  type: {
2082
1968
  min: 1,
2083
- max: "1",
2084
1969
  type: [
2085
1970
  {
2086
1971
  code: "code"
@@ -2088,7 +1973,6 @@
2088
1973
  ]
2089
1974
  },
2090
1975
  profile: {
2091
- min: 0,
2092
1976
  max: "*",
2093
1977
  type: [
2094
1978
  {
@@ -2100,8 +1984,6 @@
2100
1984
  ]
2101
1985
  },
2102
1986
  "subject[x]": {
2103
- min: 0,
2104
- max: "1",
2105
1987
  type: [
2106
1988
  {
2107
1989
  code: "CodeableConcept"
@@ -2115,7 +1997,6 @@
2115
1997
  ]
2116
1998
  },
2117
1999
  mustSupport: {
2118
- min: 0,
2119
2000
  max: "*",
2120
2001
  type: [
2121
2002
  {
@@ -2124,7 +2005,6 @@
2124
2005
  ]
2125
2006
  },
2126
2007
  codeFilter: {
2127
- min: 0,
2128
2008
  max: "*",
2129
2009
  type: [
2130
2010
  {
@@ -2133,7 +2013,6 @@
2133
2013
  ]
2134
2014
  },
2135
2015
  dateFilter: {
2136
- min: 0,
2137
2016
  max: "*",
2138
2017
  type: [
2139
2018
  {
@@ -2142,8 +2021,6 @@
2142
2021
  ]
2143
2022
  },
2144
2023
  limit: {
2145
- min: 0,
2146
- max: "1",
2147
2024
  type: [
2148
2025
  {
2149
2026
  code: "positiveInt"
@@ -2151,7 +2028,6 @@
2151
2028
  ]
2152
2029
  },
2153
2030
  sort: {
2154
- min: 0,
2155
2031
  max: "*",
2156
2032
  type: [
2157
2033
  {
@@ -2165,8 +2041,6 @@
2165
2041
  display: "DataRequirementCodeFilter",
2166
2042
  properties: {
2167
2043
  id: {
2168
- min: 0,
2169
- max: "1",
2170
2044
  type: [
2171
2045
  {
2172
2046
  code: "string"
@@ -2174,7 +2048,6 @@
2174
2048
  ]
2175
2049
  },
2176
2050
  extension: {
2177
- min: 0,
2178
2051
  max: "*",
2179
2052
  type: [
2180
2053
  {
@@ -2183,8 +2056,6 @@
2183
2056
  ]
2184
2057
  },
2185
2058
  path: {
2186
- min: 0,
2187
- max: "1",
2188
2059
  type: [
2189
2060
  {
2190
2061
  code: "string"
@@ -2192,8 +2063,6 @@
2192
2063
  ]
2193
2064
  },
2194
2065
  searchParam: {
2195
- min: 0,
2196
- max: "1",
2197
2066
  type: [
2198
2067
  {
2199
2068
  code: "string"
@@ -2201,8 +2070,6 @@
2201
2070
  ]
2202
2071
  },
2203
2072
  valueSet: {
2204
- min: 0,
2205
- max: "1",
2206
2073
  type: [
2207
2074
  {
2208
2075
  code: "canonical",
@@ -2213,7 +2080,6 @@
2213
2080
  ]
2214
2081
  },
2215
2082
  code: {
2216
- min: 0,
2217
2083
  max: "*",
2218
2084
  type: [
2219
2085
  {
@@ -2221,15 +2087,12 @@
2221
2087
  }
2222
2088
  ]
2223
2089
  }
2224
- },
2225
- parentType: "DataRequirement"
2090
+ }
2226
2091
  },
2227
2092
  DataRequirementDateFilter: {
2228
2093
  display: "DataRequirementDateFilter",
2229
2094
  properties: {
2230
2095
  id: {
2231
- min: 0,
2232
- max: "1",
2233
2096
  type: [
2234
2097
  {
2235
2098
  code: "string"
@@ -2237,7 +2100,6 @@
2237
2100
  ]
2238
2101
  },
2239
2102
  extension: {
2240
- min: 0,
2241
2103
  max: "*",
2242
2104
  type: [
2243
2105
  {
@@ -2246,8 +2108,6 @@
2246
2108
  ]
2247
2109
  },
2248
2110
  path: {
2249
- min: 0,
2250
- max: "1",
2251
2111
  type: [
2252
2112
  {
2253
2113
  code: "string"
@@ -2255,8 +2115,6 @@
2255
2115
  ]
2256
2116
  },
2257
2117
  searchParam: {
2258
- min: 0,
2259
- max: "1",
2260
2118
  type: [
2261
2119
  {
2262
2120
  code: "string"
@@ -2264,8 +2122,6 @@
2264
2122
  ]
2265
2123
  },
2266
2124
  "value[x]": {
2267
- min: 0,
2268
- max: "1",
2269
2125
  type: [
2270
2126
  {
2271
2127
  code: "dateTime"
@@ -2278,15 +2134,12 @@
2278
2134
  }
2279
2135
  ]
2280
2136
  }
2281
- },
2282
- parentType: "DataRequirement"
2137
+ }
2283
2138
  },
2284
2139
  DataRequirementSort: {
2285
2140
  display: "DataRequirementSort",
2286
2141
  properties: {
2287
2142
  id: {
2288
- min: 0,
2289
- max: "1",
2290
2143
  type: [
2291
2144
  {
2292
2145
  code: "string"
@@ -2294,7 +2147,6 @@
2294
2147
  ]
2295
2148
  },
2296
2149
  extension: {
2297
- min: 0,
2298
2150
  max: "*",
2299
2151
  type: [
2300
2152
  {
@@ -2304,7 +2156,6 @@
2304
2156
  },
2305
2157
  path: {
2306
2158
  min: 1,
2307
- max: "1",
2308
2159
  type: [
2309
2160
  {
2310
2161
  code: "string"
@@ -2313,22 +2164,18 @@
2313
2164
  },
2314
2165
  direction: {
2315
2166
  min: 1,
2316
- max: "1",
2317
2167
  type: [
2318
2168
  {
2319
2169
  code: "code"
2320
2170
  }
2321
2171
  ]
2322
2172
  }
2323
- },
2324
- parentType: "DataRequirement"
2173
+ }
2325
2174
  },
2326
2175
  Distance: {
2327
2176
  display: "Distance",
2328
2177
  properties: {
2329
2178
  id: {
2330
- min: 0,
2331
- max: "1",
2332
2179
  type: [
2333
2180
  {
2334
2181
  code: "string"
@@ -2336,7 +2183,6 @@
2336
2183
  ]
2337
2184
  },
2338
2185
  extension: {
2339
- min: 0,
2340
2186
  max: "*",
2341
2187
  type: [
2342
2188
  {
@@ -2345,8 +2191,6 @@
2345
2191
  ]
2346
2192
  },
2347
2193
  value: {
2348
- min: 0,
2349
- max: "1",
2350
2194
  type: [
2351
2195
  {
2352
2196
  code: "decimal"
@@ -2354,8 +2198,6 @@
2354
2198
  ]
2355
2199
  },
2356
2200
  comparator: {
2357
- min: 0,
2358
- max: "1",
2359
2201
  type: [
2360
2202
  {
2361
2203
  code: "code"
@@ -2363,8 +2205,6 @@
2363
2205
  ]
2364
2206
  },
2365
2207
  unit: {
2366
- min: 0,
2367
- max: "1",
2368
2208
  type: [
2369
2209
  {
2370
2210
  code: "string"
@@ -2372,8 +2212,6 @@
2372
2212
  ]
2373
2213
  },
2374
2214
  system: {
2375
- min: 0,
2376
- max: "1",
2377
2215
  type: [
2378
2216
  {
2379
2217
  code: "uri"
@@ -2381,8 +2219,6 @@
2381
2219
  ]
2382
2220
  },
2383
2221
  code: {
2384
- min: 0,
2385
- max: "1",
2386
2222
  type: [
2387
2223
  {
2388
2224
  code: "code"
@@ -2395,8 +2231,6 @@
2395
2231
  display: "Dosage",
2396
2232
  properties: {
2397
2233
  id: {
2398
- min: 0,
2399
- max: "1",
2400
2234
  type: [
2401
2235
  {
2402
2236
  code: "string"
@@ -2404,7 +2238,6 @@
2404
2238
  ]
2405
2239
  },
2406
2240
  extension: {
2407
- min: 0,
2408
2241
  max: "*",
2409
2242
  type: [
2410
2243
  {
@@ -2413,7 +2246,6 @@
2413
2246
  ]
2414
2247
  },
2415
2248
  modifierExtension: {
2416
- min: 0,
2417
2249
  max: "*",
2418
2250
  type: [
2419
2251
  {
@@ -2422,8 +2254,6 @@
2422
2254
  ]
2423
2255
  },
2424
2256
  sequence: {
2425
- min: 0,
2426
- max: "1",
2427
2257
  type: [
2428
2258
  {
2429
2259
  code: "integer"
@@ -2431,8 +2261,6 @@
2431
2261
  ]
2432
2262
  },
2433
2263
  text: {
2434
- min: 0,
2435
- max: "1",
2436
2264
  type: [
2437
2265
  {
2438
2266
  code: "string"
@@ -2440,7 +2268,6 @@
2440
2268
  ]
2441
2269
  },
2442
2270
  additionalInstruction: {
2443
- min: 0,
2444
2271
  max: "*",
2445
2272
  type: [
2446
2273
  {
@@ -2449,8 +2276,6 @@
2449
2276
  ]
2450
2277
  },
2451
2278
  patientInstruction: {
2452
- min: 0,
2453
- max: "1",
2454
2279
  type: [
2455
2280
  {
2456
2281
  code: "string"
@@ -2458,8 +2283,6 @@
2458
2283
  ]
2459
2284
  },
2460
2285
  timing: {
2461
- min: 0,
2462
- max: "1",
2463
2286
  type: [
2464
2287
  {
2465
2288
  code: "Timing"
@@ -2467,8 +2290,6 @@
2467
2290
  ]
2468
2291
  },
2469
2292
  "asNeeded[x]": {
2470
- min: 0,
2471
- max: "1",
2472
2293
  type: [
2473
2294
  {
2474
2295
  code: "boolean"
@@ -2479,8 +2300,6 @@
2479
2300
  ]
2480
2301
  },
2481
2302
  site: {
2482
- min: 0,
2483
- max: "1",
2484
2303
  type: [
2485
2304
  {
2486
2305
  code: "CodeableConcept"
@@ -2488,8 +2307,6 @@
2488
2307
  ]
2489
2308
  },
2490
2309
  route: {
2491
- min: 0,
2492
- max: "1",
2493
2310
  type: [
2494
2311
  {
2495
2312
  code: "CodeableConcept"
@@ -2497,8 +2314,6 @@
2497
2314
  ]
2498
2315
  },
2499
2316
  method: {
2500
- min: 0,
2501
- max: "1",
2502
2317
  type: [
2503
2318
  {
2504
2319
  code: "CodeableConcept"
@@ -2506,7 +2321,6 @@
2506
2321
  ]
2507
2322
  },
2508
2323
  doseAndRate: {
2509
- min: 0,
2510
2324
  max: "*",
2511
2325
  type: [
2512
2326
  {
@@ -2515,8 +2329,6 @@
2515
2329
  ]
2516
2330
  },
2517
2331
  maxDosePerPeriod: {
2518
- min: 0,
2519
- max: "1",
2520
2332
  type: [
2521
2333
  {
2522
2334
  code: "Ratio"
@@ -2524,8 +2336,6 @@
2524
2336
  ]
2525
2337
  },
2526
2338
  maxDosePerAdministration: {
2527
- min: 0,
2528
- max: "1",
2529
2339
  type: [
2530
2340
  {
2531
2341
  code: "Quantity",
@@ -2536,8 +2346,6 @@
2536
2346
  ]
2537
2347
  },
2538
2348
  maxDosePerLifetime: {
2539
- min: 0,
2540
- max: "1",
2541
2349
  type: [
2542
2350
  {
2543
2351
  code: "Quantity",
@@ -2553,8 +2361,6 @@
2553
2361
  display: "DosageDoseAndRate",
2554
2362
  properties: {
2555
2363
  id: {
2556
- min: 0,
2557
- max: "1",
2558
2364
  type: [
2559
2365
  {
2560
2366
  code: "string"
@@ -2562,7 +2368,6 @@
2562
2368
  ]
2563
2369
  },
2564
2370
  extension: {
2565
- min: 0,
2566
2371
  max: "*",
2567
2372
  type: [
2568
2373
  {
@@ -2571,8 +2376,6 @@
2571
2376
  ]
2572
2377
  },
2573
2378
  type: {
2574
- min: 0,
2575
- max: "1",
2576
2379
  type: [
2577
2380
  {
2578
2381
  code: "CodeableConcept"
@@ -2580,8 +2383,6 @@
2580
2383
  ]
2581
2384
  },
2582
2385
  "dose[x]": {
2583
- min: 0,
2584
- max: "1",
2585
2386
  type: [
2586
2387
  {
2587
2388
  code: "Range"
@@ -2595,8 +2396,6 @@
2595
2396
  ]
2596
2397
  },
2597
2398
  "rate[x]": {
2598
- min: 0,
2599
- max: "1",
2600
2399
  type: [
2601
2400
  {
2602
2401
  code: "Ratio"
@@ -2612,15 +2411,12 @@
2612
2411
  }
2613
2412
  ]
2614
2413
  }
2615
- },
2616
- parentType: "Dosage"
2414
+ }
2617
2415
  },
2618
2416
  Duration: {
2619
2417
  display: "Duration",
2620
2418
  properties: {
2621
2419
  id: {
2622
- min: 0,
2623
- max: "1",
2624
2420
  type: [
2625
2421
  {
2626
2422
  code: "string"
@@ -2628,7 +2424,6 @@
2628
2424
  ]
2629
2425
  },
2630
2426
  extension: {
2631
- min: 0,
2632
2427
  max: "*",
2633
2428
  type: [
2634
2429
  {
@@ -2637,8 +2432,6 @@
2637
2432
  ]
2638
2433
  },
2639
2434
  value: {
2640
- min: 0,
2641
- max: "1",
2642
2435
  type: [
2643
2436
  {
2644
2437
  code: "decimal"
@@ -2646,8 +2439,6 @@
2646
2439
  ]
2647
2440
  },
2648
2441
  comparator: {
2649
- min: 0,
2650
- max: "1",
2651
2442
  type: [
2652
2443
  {
2653
2444
  code: "code"
@@ -2655,8 +2446,6 @@
2655
2446
  ]
2656
2447
  },
2657
2448
  unit: {
2658
- min: 0,
2659
- max: "1",
2660
2449
  type: [
2661
2450
  {
2662
2451
  code: "string"
@@ -2664,8 +2453,6 @@
2664
2453
  ]
2665
2454
  },
2666
2455
  system: {
2667
- min: 0,
2668
- max: "1",
2669
2456
  type: [
2670
2457
  {
2671
2458
  code: "uri"
@@ -2673,8 +2460,6 @@
2673
2460
  ]
2674
2461
  },
2675
2462
  code: {
2676
- min: 0,
2677
- max: "1",
2678
2463
  type: [
2679
2464
  {
2680
2465
  code: "code"
@@ -2687,8 +2472,6 @@
2687
2472
  display: "ElementDefinition",
2688
2473
  properties: {
2689
2474
  id: {
2690
- min: 0,
2691
- max: "1",
2692
2475
  type: [
2693
2476
  {
2694
2477
  code: "string"
@@ -2696,7 +2479,6 @@
2696
2479
  ]
2697
2480
  },
2698
2481
  extension: {
2699
- min: 0,
2700
2482
  max: "*",
2701
2483
  type: [
2702
2484
  {
@@ -2705,7 +2487,6 @@
2705
2487
  ]
2706
2488
  },
2707
2489
  modifierExtension: {
2708
- min: 0,
2709
2490
  max: "*",
2710
2491
  type: [
2711
2492
  {
@@ -2715,7 +2496,6 @@
2715
2496
  },
2716
2497
  path: {
2717
2498
  min: 1,
2718
- max: "1",
2719
2499
  type: [
2720
2500
  {
2721
2501
  code: "string"
@@ -2723,7 +2503,6 @@
2723
2503
  ]
2724
2504
  },
2725
2505
  representation: {
2726
- min: 0,
2727
2506
  max: "*",
2728
2507
  type: [
2729
2508
  {
@@ -2732,8 +2511,6 @@
2732
2511
  ]
2733
2512
  },
2734
2513
  sliceName: {
2735
- min: 0,
2736
- max: "1",
2737
2514
  type: [
2738
2515
  {
2739
2516
  code: "string"
@@ -2741,8 +2518,6 @@
2741
2518
  ]
2742
2519
  },
2743
2520
  sliceIsConstraining: {
2744
- min: 0,
2745
- max: "1",
2746
2521
  type: [
2747
2522
  {
2748
2523
  code: "boolean"
@@ -2750,8 +2525,6 @@
2750
2525
  ]
2751
2526
  },
2752
2527
  label: {
2753
- min: 0,
2754
- max: "1",
2755
2528
  type: [
2756
2529
  {
2757
2530
  code: "string"
@@ -2759,7 +2532,6 @@
2759
2532
  ]
2760
2533
  },
2761
2534
  code: {
2762
- min: 0,
2763
2535
  max: "*",
2764
2536
  type: [
2765
2537
  {
@@ -2768,8 +2540,6 @@
2768
2540
  ]
2769
2541
  },
2770
2542
  slicing: {
2771
- min: 0,
2772
- max: "1",
2773
2543
  type: [
2774
2544
  {
2775
2545
  code: "Element"
@@ -2777,8 +2547,6 @@
2777
2547
  ]
2778
2548
  },
2779
2549
  short: {
2780
- min: 0,
2781
- max: "1",
2782
2550
  type: [
2783
2551
  {
2784
2552
  code: "string"
@@ -2786,8 +2554,6 @@
2786
2554
  ]
2787
2555
  },
2788
2556
  definition: {
2789
- min: 0,
2790
- max: "1",
2791
2557
  type: [
2792
2558
  {
2793
2559
  code: "markdown"
@@ -2795,8 +2561,6 @@
2795
2561
  ]
2796
2562
  },
2797
2563
  comment: {
2798
- min: 0,
2799
- max: "1",
2800
2564
  type: [
2801
2565
  {
2802
2566
  code: "markdown"
@@ -2804,8 +2568,6 @@
2804
2568
  ]
2805
2569
  },
2806
2570
  requirements: {
2807
- min: 0,
2808
- max: "1",
2809
2571
  type: [
2810
2572
  {
2811
2573
  code: "markdown"
@@ -2813,7 +2575,6 @@
2813
2575
  ]
2814
2576
  },
2815
2577
  alias: {
2816
- min: 0,
2817
2578
  max: "*",
2818
2579
  type: [
2819
2580
  {
@@ -2822,8 +2583,6 @@
2822
2583
  ]
2823
2584
  },
2824
2585
  min: {
2825
- min: 0,
2826
- max: "1",
2827
2586
  type: [
2828
2587
  {
2829
2588
  code: "unsignedInt"
@@ -2831,8 +2590,6 @@
2831
2590
  ]
2832
2591
  },
2833
2592
  max: {
2834
- min: 0,
2835
- max: "1",
2836
2593
  type: [
2837
2594
  {
2838
2595
  code: "string"
@@ -2840,8 +2597,6 @@
2840
2597
  ]
2841
2598
  },
2842
2599
  base: {
2843
- min: 0,
2844
- max: "1",
2845
2600
  type: [
2846
2601
  {
2847
2602
  code: "Element"
@@ -2849,8 +2604,6 @@
2849
2604
  ]
2850
2605
  },
2851
2606
  contentReference: {
2852
- min: 0,
2853
- max: "1",
2854
2607
  type: [
2855
2608
  {
2856
2609
  code: "uri"
@@ -2858,7 +2611,6 @@
2858
2611
  ]
2859
2612
  },
2860
2613
  type: {
2861
- min: 0,
2862
2614
  max: "*",
2863
2615
  type: [
2864
2616
  {
@@ -2867,8 +2619,6 @@
2867
2619
  ]
2868
2620
  },
2869
2621
  "defaultValue[x]": {
2870
- min: 0,
2871
- max: "1",
2872
2622
  type: [
2873
2623
  {
2874
2624
  code: "base64Binary"
@@ -3023,8 +2773,6 @@
3023
2773
  ]
3024
2774
  },
3025
2775
  meaningWhenMissing: {
3026
- min: 0,
3027
- max: "1",
3028
2776
  type: [
3029
2777
  {
3030
2778
  code: "markdown"
@@ -3032,8 +2780,6 @@
3032
2780
  ]
3033
2781
  },
3034
2782
  orderMeaning: {
3035
- min: 0,
3036
- max: "1",
3037
2783
  type: [
3038
2784
  {
3039
2785
  code: "string"
@@ -3041,8 +2787,6 @@
3041
2787
  ]
3042
2788
  },
3043
2789
  "fixed[x]": {
3044
- min: 0,
3045
- max: "1",
3046
2790
  type: [
3047
2791
  {
3048
2792
  code: "base64Binary"
@@ -3197,8 +2941,6 @@
3197
2941
  ]
3198
2942
  },
3199
2943
  "pattern[x]": {
3200
- min: 0,
3201
- max: "1",
3202
2944
  type: [
3203
2945
  {
3204
2946
  code: "base64Binary"
@@ -3353,7 +3095,6 @@
3353
3095
  ]
3354
3096
  },
3355
3097
  example: {
3356
- min: 0,
3357
3098
  max: "*",
3358
3099
  type: [
3359
3100
  {
@@ -3362,8 +3103,6 @@
3362
3103
  ]
3363
3104
  },
3364
3105
  "minValue[x]": {
3365
- min: 0,
3366
- max: "1",
3367
3106
  type: [
3368
3107
  {
3369
3108
  code: "date"
@@ -3395,8 +3134,6 @@
3395
3134
  ]
3396
3135
  },
3397
3136
  "maxValue[x]": {
3398
- min: 0,
3399
- max: "1",
3400
3137
  type: [
3401
3138
  {
3402
3139
  code: "date"
@@ -3428,8 +3165,6 @@
3428
3165
  ]
3429
3166
  },
3430
3167
  maxLength: {
3431
- min: 0,
3432
- max: "1",
3433
3168
  type: [
3434
3169
  {
3435
3170
  code: "integer"
@@ -3437,7 +3172,6 @@
3437
3172
  ]
3438
3173
  },
3439
3174
  condition: {
3440
- min: 0,
3441
3175
  max: "*",
3442
3176
  type: [
3443
3177
  {
@@ -3446,7 +3180,6 @@
3446
3180
  ]
3447
3181
  },
3448
3182
  constraint: {
3449
- min: 0,
3450
3183
  max: "*",
3451
3184
  type: [
3452
3185
  {
@@ -3455,8 +3188,6 @@
3455
3188
  ]
3456
3189
  },
3457
3190
  mustSupport: {
3458
- min: 0,
3459
- max: "1",
3460
3191
  type: [
3461
3192
  {
3462
3193
  code: "boolean"
@@ -3464,8 +3195,6 @@
3464
3195
  ]
3465
3196
  },
3466
3197
  isModifier: {
3467
- min: 0,
3468
- max: "1",
3469
3198
  type: [
3470
3199
  {
3471
3200
  code: "boolean"
@@ -3473,8 +3202,6 @@
3473
3202
  ]
3474
3203
  },
3475
3204
  isModifierReason: {
3476
- min: 0,
3477
- max: "1",
3478
3205
  type: [
3479
3206
  {
3480
3207
  code: "string"
@@ -3482,8 +3209,6 @@
3482
3209
  ]
3483
3210
  },
3484
3211
  isSummary: {
3485
- min: 0,
3486
- max: "1",
3487
3212
  type: [
3488
3213
  {
3489
3214
  code: "boolean"
@@ -3491,8 +3216,6 @@
3491
3216
  ]
3492
3217
  },
3493
3218
  binding: {
3494
- min: 0,
3495
- max: "1",
3496
3219
  type: [
3497
3220
  {
3498
3221
  code: "Element"
@@ -3500,7 +3223,6 @@
3500
3223
  ]
3501
3224
  },
3502
3225
  mapping: {
3503
- min: 0,
3504
3226
  max: "*",
3505
3227
  type: [
3506
3228
  {
@@ -3514,8 +3236,6 @@
3514
3236
  display: "ElementDefinitionSlicing",
3515
3237
  properties: {
3516
3238
  id: {
3517
- min: 0,
3518
- max: "1",
3519
3239
  type: [
3520
3240
  {
3521
3241
  code: "string"
@@ -3523,7 +3243,6 @@
3523
3243
  ]
3524
3244
  },
3525
3245
  extension: {
3526
- min: 0,
3527
3246
  max: "*",
3528
3247
  type: [
3529
3248
  {
@@ -3532,7 +3251,6 @@
3532
3251
  ]
3533
3252
  },
3534
3253
  discriminator: {
3535
- min: 0,
3536
3254
  max: "*",
3537
3255
  type: [
3538
3256
  {
@@ -3541,8 +3259,6 @@
3541
3259
  ]
3542
3260
  },
3543
3261
  description: {
3544
- min: 0,
3545
- max: "1",
3546
3262
  type: [
3547
3263
  {
3548
3264
  code: "string"
@@ -3550,8 +3266,6 @@
3550
3266
  ]
3551
3267
  },
3552
3268
  ordered: {
3553
- min: 0,
3554
- max: "1",
3555
3269
  type: [
3556
3270
  {
3557
3271
  code: "boolean"
@@ -3560,22 +3274,18 @@
3560
3274
  },
3561
3275
  rules: {
3562
3276
  min: 1,
3563
- max: "1",
3564
3277
  type: [
3565
3278
  {
3566
3279
  code: "code"
3567
3280
  }
3568
3281
  ]
3569
3282
  }
3570
- },
3571
- parentType: "ElementDefinition"
3283
+ }
3572
3284
  },
3573
3285
  ElementDefinitionSlicingDiscriminator: {
3574
3286
  display: "ElementDefinitionSlicingDiscriminator",
3575
3287
  properties: {
3576
3288
  id: {
3577
- min: 0,
3578
- max: "1",
3579
3289
  type: [
3580
3290
  {
3581
3291
  code: "string"
@@ -3583,7 +3293,6 @@
3583
3293
  ]
3584
3294
  },
3585
3295
  extension: {
3586
- min: 0,
3587
3296
  max: "*",
3588
3297
  type: [
3589
3298
  {
@@ -3593,7 +3302,6 @@
3593
3302
  },
3594
3303
  type: {
3595
3304
  min: 1,
3596
- max: "1",
3597
3305
  type: [
3598
3306
  {
3599
3307
  code: "code"
@@ -3602,22 +3310,18 @@
3602
3310
  },
3603
3311
  path: {
3604
3312
  min: 1,
3605
- max: "1",
3606
3313
  type: [
3607
3314
  {
3608
3315
  code: "string"
3609
3316
  }
3610
3317
  ]
3611
3318
  }
3612
- },
3613
- parentType: "ElementDefinitionSlicing"
3319
+ }
3614
3320
  },
3615
3321
  ElementDefinitionBase: {
3616
3322
  display: "ElementDefinitionBase",
3617
3323
  properties: {
3618
3324
  id: {
3619
- min: 0,
3620
- max: "1",
3621
3325
  type: [
3622
3326
  {
3623
3327
  code: "string"
@@ -3625,7 +3329,6 @@
3625
3329
  ]
3626
3330
  },
3627
3331
  extension: {
3628
- min: 0,
3629
3332
  max: "*",
3630
3333
  type: [
3631
3334
  {
@@ -3635,7 +3338,6 @@
3635
3338
  },
3636
3339
  path: {
3637
3340
  min: 1,
3638
- max: "1",
3639
3341
  type: [
3640
3342
  {
3641
3343
  code: "string"
@@ -3644,7 +3346,6 @@
3644
3346
  },
3645
3347
  min: {
3646
3348
  min: 1,
3647
- max: "1",
3648
3349
  type: [
3649
3350
  {
3650
3351
  code: "unsignedInt"
@@ -3653,22 +3354,18 @@
3653
3354
  },
3654
3355
  max: {
3655
3356
  min: 1,
3656
- max: "1",
3657
3357
  type: [
3658
3358
  {
3659
3359
  code: "string"
3660
3360
  }
3661
3361
  ]
3662
3362
  }
3663
- },
3664
- parentType: "ElementDefinition"
3363
+ }
3665
3364
  },
3666
3365
  ElementDefinitionType: {
3667
3366
  display: "ElementDefinitionType",
3668
3367
  properties: {
3669
3368
  id: {
3670
- min: 0,
3671
- max: "1",
3672
3369
  type: [
3673
3370
  {
3674
3371
  code: "string"
@@ -3676,7 +3373,6 @@
3676
3373
  ]
3677
3374
  },
3678
3375
  extension: {
3679
- min: 0,
3680
3376
  max: "*",
3681
3377
  type: [
3682
3378
  {
@@ -3686,7 +3382,6 @@
3686
3382
  },
3687
3383
  code: {
3688
3384
  min: 1,
3689
- max: "1",
3690
3385
  type: [
3691
3386
  {
3692
3387
  code: "uri"
@@ -3694,7 +3389,6 @@
3694
3389
  ]
3695
3390
  },
3696
3391
  profile: {
3697
- min: 0,
3698
3392
  max: "*",
3699
3393
  type: [
3700
3394
  {
@@ -3707,7 +3401,6 @@
3707
3401
  ]
3708
3402
  },
3709
3403
  targetProfile: {
3710
- min: 0,
3711
3404
  max: "*",
3712
3405
  type: [
3713
3406
  {
@@ -3720,7 +3413,6 @@
3720
3413
  ]
3721
3414
  },
3722
3415
  aggregation: {
3723
- min: 0,
3724
3416
  max: "*",
3725
3417
  type: [
3726
3418
  {
@@ -3729,23 +3421,18 @@
3729
3421
  ]
3730
3422
  },
3731
3423
  versioning: {
3732
- min: 0,
3733
- max: "1",
3734
3424
  type: [
3735
3425
  {
3736
3426
  code: "code"
3737
3427
  }
3738
3428
  ]
3739
3429
  }
3740
- },
3741
- parentType: "ElementDefinition"
3430
+ }
3742
3431
  },
3743
3432
  ElementDefinitionExample: {
3744
3433
  display: "ElementDefinitionExample",
3745
3434
  properties: {
3746
3435
  id: {
3747
- min: 0,
3748
- max: "1",
3749
3436
  type: [
3750
3437
  {
3751
3438
  code: "string"
@@ -3753,7 +3440,6 @@
3753
3440
  ]
3754
3441
  },
3755
3442
  extension: {
3756
- min: 0,
3757
3443
  max: "*",
3758
3444
  type: [
3759
3445
  {
@@ -3763,7 +3449,6 @@
3763
3449
  },
3764
3450
  label: {
3765
3451
  min: 1,
3766
- max: "1",
3767
3452
  type: [
3768
3453
  {
3769
3454
  code: "string"
@@ -3772,7 +3457,6 @@
3772
3457
  },
3773
3458
  "value[x]": {
3774
3459
  min: 1,
3775
- max: "1",
3776
3460
  type: [
3777
3461
  {
3778
3462
  code: "base64Binary"
@@ -3926,15 +3610,12 @@
3926
3610
  }
3927
3611
  ]
3928
3612
  }
3929
- },
3930
- parentType: "ElementDefinition"
3613
+ }
3931
3614
  },
3932
3615
  ElementDefinitionConstraint: {
3933
3616
  display: "ElementDefinitionConstraint",
3934
3617
  properties: {
3935
3618
  id: {
3936
- min: 0,
3937
- max: "1",
3938
3619
  type: [
3939
3620
  {
3940
3621
  code: "string"
@@ -3942,7 +3623,6 @@
3942
3623
  ]
3943
3624
  },
3944
3625
  extension: {
3945
- min: 0,
3946
3626
  max: "*",
3947
3627
  type: [
3948
3628
  {
@@ -3952,7 +3632,6 @@
3952
3632
  },
3953
3633
  key: {
3954
3634
  min: 1,
3955
- max: "1",
3956
3635
  type: [
3957
3636
  {
3958
3637
  code: "id"
@@ -3960,8 +3639,6 @@
3960
3639
  ]
3961
3640
  },
3962
3641
  requirements: {
3963
- min: 0,
3964
- max: "1",
3965
3642
  type: [
3966
3643
  {
3967
3644
  code: "string"
@@ -3970,7 +3647,6 @@
3970
3647
  },
3971
3648
  severity: {
3972
3649
  min: 1,
3973
- max: "1",
3974
3650
  type: [
3975
3651
  {
3976
3652
  code: "code"
@@ -3979,7 +3655,6 @@
3979
3655
  },
3980
3656
  human: {
3981
3657
  min: 1,
3982
- max: "1",
3983
3658
  type: [
3984
3659
  {
3985
3660
  code: "string"
@@ -3987,8 +3662,6 @@
3987
3662
  ]
3988
3663
  },
3989
3664
  expression: {
3990
- min: 0,
3991
- max: "1",
3992
3665
  type: [
3993
3666
  {
3994
3667
  code: "string"
@@ -3996,8 +3669,6 @@
3996
3669
  ]
3997
3670
  },
3998
3671
  xpath: {
3999
- min: 0,
4000
- max: "1",
4001
3672
  type: [
4002
3673
  {
4003
3674
  code: "string"
@@ -4005,8 +3676,6 @@
4005
3676
  ]
4006
3677
  },
4007
3678
  source: {
4008
- min: 0,
4009
- max: "1",
4010
3679
  type: [
4011
3680
  {
4012
3681
  code: "canonical",
@@ -4016,15 +3685,12 @@
4016
3685
  }
4017
3686
  ]
4018
3687
  }
4019
- },
4020
- parentType: "ElementDefinition"
3688
+ }
4021
3689
  },
4022
3690
  ElementDefinitionBinding: {
4023
3691
  display: "ElementDefinitionBinding",
4024
3692
  properties: {
4025
3693
  id: {
4026
- min: 0,
4027
- max: "1",
4028
3694
  type: [
4029
3695
  {
4030
3696
  code: "string"
@@ -4032,7 +3698,6 @@
4032
3698
  ]
4033
3699
  },
4034
3700
  extension: {
4035
- min: 0,
4036
3701
  max: "*",
4037
3702
  type: [
4038
3703
  {
@@ -4042,7 +3707,6 @@
4042
3707
  },
4043
3708
  strength: {
4044
3709
  min: 1,
4045
- max: "1",
4046
3710
  type: [
4047
3711
  {
4048
3712
  code: "code"
@@ -4050,8 +3714,6 @@
4050
3714
  ]
4051
3715
  },
4052
3716
  description: {
4053
- min: 0,
4054
- max: "1",
4055
3717
  type: [
4056
3718
  {
4057
3719
  code: "string"
@@ -4059,8 +3721,6 @@
4059
3721
  ]
4060
3722
  },
4061
3723
  valueSet: {
4062
- min: 0,
4063
- max: "1",
4064
3724
  type: [
4065
3725
  {
4066
3726
  code: "canonical",
@@ -4070,15 +3730,12 @@
4070
3730
  }
4071
3731
  ]
4072
3732
  }
4073
- },
4074
- parentType: "ElementDefinition"
3733
+ }
4075
3734
  },
4076
3735
  ElementDefinitionMapping: {
4077
3736
  display: "ElementDefinitionMapping",
4078
3737
  properties: {
4079
3738
  id: {
4080
- min: 0,
4081
- max: "1",
4082
3739
  type: [
4083
3740
  {
4084
3741
  code: "string"
@@ -4086,7 +3743,6 @@
4086
3743
  ]
4087
3744
  },
4088
3745
  extension: {
4089
- min: 0,
4090
3746
  max: "*",
4091
3747
  type: [
4092
3748
  {
@@ -4096,7 +3752,6 @@
4096
3752
  },
4097
3753
  identity: {
4098
3754
  min: 1,
4099
- max: "1",
4100
3755
  type: [
4101
3756
  {
4102
3757
  code: "id"
@@ -4104,8 +3759,6 @@
4104
3759
  ]
4105
3760
  },
4106
3761
  language: {
4107
- min: 0,
4108
- max: "1",
4109
3762
  type: [
4110
3763
  {
4111
3764
  code: "code"
@@ -4114,7 +3767,6 @@
4114
3767
  },
4115
3768
  map: {
4116
3769
  min: 1,
4117
- max: "1",
4118
3770
  type: [
4119
3771
  {
4120
3772
  code: "string"
@@ -4122,23 +3774,18 @@
4122
3774
  ]
4123
3775
  },
4124
3776
  comment: {
4125
- min: 0,
4126
- max: "1",
4127
3777
  type: [
4128
3778
  {
4129
3779
  code: "string"
4130
3780
  }
4131
3781
  ]
4132
3782
  }
4133
- },
4134
- parentType: "ElementDefinition"
3783
+ }
4135
3784
  },
4136
3785
  Expression: {
4137
3786
  display: "Expression",
4138
3787
  properties: {
4139
3788
  id: {
4140
- min: 0,
4141
- max: "1",
4142
3789
  type: [
4143
3790
  {
4144
3791
  code: "string"
@@ -4146,7 +3793,6 @@
4146
3793
  ]
4147
3794
  },
4148
3795
  extension: {
4149
- min: 0,
4150
3796
  max: "*",
4151
3797
  type: [
4152
3798
  {
@@ -4155,8 +3801,6 @@
4155
3801
  ]
4156
3802
  },
4157
3803
  description: {
4158
- min: 0,
4159
- max: "1",
4160
3804
  type: [
4161
3805
  {
4162
3806
  code: "string"
@@ -4164,8 +3808,6 @@
4164
3808
  ]
4165
3809
  },
4166
3810
  name: {
4167
- min: 0,
4168
- max: "1",
4169
3811
  type: [
4170
3812
  {
4171
3813
  code: "id"
@@ -4174,7 +3816,6 @@
4174
3816
  },
4175
3817
  language: {
4176
3818
  min: 1,
4177
- max: "1",
4178
3819
  type: [
4179
3820
  {
4180
3821
  code: "code"
@@ -4182,8 +3823,6 @@
4182
3823
  ]
4183
3824
  },
4184
3825
  expression: {
4185
- min: 0,
4186
- max: "1",
4187
3826
  type: [
4188
3827
  {
4189
3828
  code: "string"
@@ -4191,8 +3830,6 @@
4191
3830
  ]
4192
3831
  },
4193
3832
  reference: {
4194
- min: 0,
4195
- max: "1",
4196
3833
  type: [
4197
3834
  {
4198
3835
  code: "uri"
@@ -4205,8 +3842,6 @@
4205
3842
  display: "Extension",
4206
3843
  properties: {
4207
3844
  id: {
4208
- min: 0,
4209
- max: "1",
4210
3845
  type: [
4211
3846
  {
4212
3847
  code: "string"
@@ -4214,7 +3849,6 @@
4214
3849
  ]
4215
3850
  },
4216
3851
  extension: {
4217
- min: 0,
4218
3852
  max: "*",
4219
3853
  type: [
4220
3854
  {
@@ -4224,7 +3858,6 @@
4224
3858
  },
4225
3859
  url: {
4226
3860
  min: 1,
4227
- max: "1",
4228
3861
  type: [
4229
3862
  {
4230
3863
  code: "string"
@@ -4232,8 +3865,6 @@
4232
3865
  ]
4233
3866
  },
4234
3867
  "value[x]": {
4235
- min: 0,
4236
- max: "1",
4237
3868
  type: [
4238
3869
  {
4239
3870
  code: "base64Binary"
@@ -4393,8 +4024,6 @@
4393
4024
  display: "HumanName",
4394
4025
  properties: {
4395
4026
  id: {
4396
- min: 0,
4397
- max: "1",
4398
4027
  type: [
4399
4028
  {
4400
4029
  code: "string"
@@ -4402,7 +4031,6 @@
4402
4031
  ]
4403
4032
  },
4404
4033
  extension: {
4405
- min: 0,
4406
4034
  max: "*",
4407
4035
  type: [
4408
4036
  {
@@ -4411,8 +4039,6 @@
4411
4039
  ]
4412
4040
  },
4413
4041
  use: {
4414
- min: 0,
4415
- max: "1",
4416
4042
  type: [
4417
4043
  {
4418
4044
  code: "code"
@@ -4420,8 +4046,6 @@
4420
4046
  ]
4421
4047
  },
4422
4048
  text: {
4423
- min: 0,
4424
- max: "1",
4425
4049
  type: [
4426
4050
  {
4427
4051
  code: "string"
@@ -4429,8 +4053,6 @@
4429
4053
  ]
4430
4054
  },
4431
4055
  family: {
4432
- min: 0,
4433
- max: "1",
4434
4056
  type: [
4435
4057
  {
4436
4058
  code: "string"
@@ -4438,7 +4060,6 @@
4438
4060
  ]
4439
4061
  },
4440
4062
  given: {
4441
- min: 0,
4442
4063
  max: "*",
4443
4064
  type: [
4444
4065
  {
@@ -4447,7 +4068,6 @@
4447
4068
  ]
4448
4069
  },
4449
4070
  prefix: {
4450
- min: 0,
4451
4071
  max: "*",
4452
4072
  type: [
4453
4073
  {
@@ -4456,7 +4076,6 @@
4456
4076
  ]
4457
4077
  },
4458
4078
  suffix: {
4459
- min: 0,
4460
4079
  max: "*",
4461
4080
  type: [
4462
4081
  {
@@ -4465,8 +4084,6 @@
4465
4084
  ]
4466
4085
  },
4467
4086
  period: {
4468
- min: 0,
4469
- max: "1",
4470
4087
  type: [
4471
4088
  {
4472
4089
  code: "Period"
@@ -4479,8 +4096,6 @@
4479
4096
  display: "Identifier",
4480
4097
  properties: {
4481
4098
  id: {
4482
- min: 0,
4483
- max: "1",
4484
4099
  type: [
4485
4100
  {
4486
4101
  code: "string"
@@ -4488,7 +4103,6 @@
4488
4103
  ]
4489
4104
  },
4490
4105
  extension: {
4491
- min: 0,
4492
4106
  max: "*",
4493
4107
  type: [
4494
4108
  {
@@ -4497,8 +4111,6 @@
4497
4111
  ]
4498
4112
  },
4499
4113
  use: {
4500
- min: 0,
4501
- max: "1",
4502
4114
  type: [
4503
4115
  {
4504
4116
  code: "code"
@@ -4506,8 +4118,6 @@
4506
4118
  ]
4507
4119
  },
4508
4120
  type: {
4509
- min: 0,
4510
- max: "1",
4511
4121
  type: [
4512
4122
  {
4513
4123
  code: "CodeableConcept"
@@ -4515,8 +4125,6 @@
4515
4125
  ]
4516
4126
  },
4517
4127
  system: {
4518
- min: 0,
4519
- max: "1",
4520
4128
  type: [
4521
4129
  {
4522
4130
  code: "uri"
@@ -4524,8 +4132,6 @@
4524
4132
  ]
4525
4133
  },
4526
4134
  value: {
4527
- min: 0,
4528
- max: "1",
4529
4135
  type: [
4530
4136
  {
4531
4137
  code: "string"
@@ -4533,8 +4139,6 @@
4533
4139
  ]
4534
4140
  },
4535
4141
  period: {
4536
- min: 0,
4537
- max: "1",
4538
4142
  type: [
4539
4143
  {
4540
4144
  code: "Period"
@@ -4542,8 +4146,6 @@
4542
4146
  ]
4543
4147
  },
4544
4148
  assigner: {
4545
- min: 0,
4546
- max: "1",
4547
4149
  type: [
4548
4150
  {
4549
4151
  code: "Reference",
@@ -4559,8 +4161,6 @@
4559
4161
  display: "MarketingStatus",
4560
4162
  properties: {
4561
4163
  id: {
4562
- min: 0,
4563
- max: "1",
4564
4164
  type: [
4565
4165
  {
4566
4166
  code: "string"
@@ -4568,7 +4168,6 @@
4568
4168
  ]
4569
4169
  },
4570
4170
  extension: {
4571
- min: 0,
4572
4171
  max: "*",
4573
4172
  type: [
4574
4173
  {
@@ -4577,7 +4176,6 @@
4577
4176
  ]
4578
4177
  },
4579
4178
  modifierExtension: {
4580
- min: 0,
4581
4179
  max: "*",
4582
4180
  type: [
4583
4181
  {
@@ -4587,7 +4185,6 @@
4587
4185
  },
4588
4186
  country: {
4589
4187
  min: 1,
4590
- max: "1",
4591
4188
  type: [
4592
4189
  {
4593
4190
  code: "CodeableConcept"
@@ -4595,8 +4192,6 @@
4595
4192
  ]
4596
4193
  },
4597
4194
  jurisdiction: {
4598
- min: 0,
4599
- max: "1",
4600
4195
  type: [
4601
4196
  {
4602
4197
  code: "CodeableConcept"
@@ -4605,7 +4200,6 @@
4605
4200
  },
4606
4201
  status: {
4607
4202
  min: 1,
4608
- max: "1",
4609
4203
  type: [
4610
4204
  {
4611
4205
  code: "CodeableConcept"
@@ -4614,7 +4208,6 @@
4614
4208
  },
4615
4209
  dateRange: {
4616
4210
  min: 1,
4617
- max: "1",
4618
4211
  type: [
4619
4212
  {
4620
4213
  code: "Period"
@@ -4622,8 +4215,6 @@
4622
4215
  ]
4623
4216
  },
4624
4217
  restoreDate: {
4625
- min: 0,
4626
- max: "1",
4627
4218
  type: [
4628
4219
  {
4629
4220
  code: "dateTime"
@@ -4636,8 +4227,6 @@
4636
4227
  display: "Meta",
4637
4228
  properties: {
4638
4229
  id: {
4639
- min: 0,
4640
- max: "1",
4641
4230
  type: [
4642
4231
  {
4643
4232
  code: "string"
@@ -4645,7 +4234,6 @@
4645
4234
  ]
4646
4235
  },
4647
4236
  extension: {
4648
- min: 0,
4649
4237
  max: "*",
4650
4238
  type: [
4651
4239
  {
@@ -4654,8 +4242,6 @@
4654
4242
  ]
4655
4243
  },
4656
4244
  versionId: {
4657
- min: 0,
4658
- max: "1",
4659
4245
  type: [
4660
4246
  {
4661
4247
  code: "id"
@@ -4663,8 +4249,6 @@
4663
4249
  ]
4664
4250
  },
4665
4251
  lastUpdated: {
4666
- min: 0,
4667
- max: "1",
4668
4252
  type: [
4669
4253
  {
4670
4254
  code: "instant"
@@ -4672,8 +4256,6 @@
4672
4256
  ]
4673
4257
  },
4674
4258
  source: {
4675
- min: 0,
4676
- max: "1",
4677
4259
  type: [
4678
4260
  {
4679
4261
  code: "uri"
@@ -4681,7 +4263,6 @@
4681
4263
  ]
4682
4264
  },
4683
4265
  profile: {
4684
- min: 0,
4685
4266
  max: "*",
4686
4267
  type: [
4687
4268
  {
@@ -4693,7 +4274,6 @@
4693
4274
  ]
4694
4275
  },
4695
4276
  security: {
4696
- min: 0,
4697
4277
  max: "*",
4698
4278
  type: [
4699
4279
  {
@@ -4702,7 +4282,6 @@
4702
4282
  ]
4703
4283
  },
4704
4284
  tag: {
4705
- min: 0,
4706
4285
  max: "*",
4707
4286
  type: [
4708
4287
  {
@@ -4711,8 +4290,6 @@
4711
4290
  ]
4712
4291
  },
4713
4292
  project: {
4714
- min: 0,
4715
- max: "1",
4716
4293
  type: [
4717
4294
  {
4718
4295
  code: "uri"
@@ -4720,8 +4297,6 @@
4720
4297
  ]
4721
4298
  },
4722
4299
  author: {
4723
- min: 0,
4724
- max: "1",
4725
4300
  type: [
4726
4301
  {
4727
4302
  code: "Reference"
@@ -4729,8 +4304,14 @@
4729
4304
  ]
4730
4305
  },
4731
4306
  account: {
4732
- min: 0,
4733
- max: "1",
4307
+ type: [
4308
+ {
4309
+ code: "Reference"
4310
+ }
4311
+ ]
4312
+ },
4313
+ compartment: {
4314
+ max: "*",
4734
4315
  type: [
4735
4316
  {
4736
4317
  code: "Reference"
@@ -4743,8 +4324,6 @@
4743
4324
  display: "Money",
4744
4325
  properties: {
4745
4326
  id: {
4746
- min: 0,
4747
- max: "1",
4748
4327
  type: [
4749
4328
  {
4750
4329
  code: "string"
@@ -4752,7 +4331,6 @@
4752
4331
  ]
4753
4332
  },
4754
4333
  extension: {
4755
- min: 0,
4756
4334
  max: "*",
4757
4335
  type: [
4758
4336
  {
@@ -4761,8 +4339,6 @@
4761
4339
  ]
4762
4340
  },
4763
4341
  value: {
4764
- min: 0,
4765
- max: "1",
4766
4342
  type: [
4767
4343
  {
4768
4344
  code: "decimal"
@@ -4770,8 +4346,6 @@
4770
4346
  ]
4771
4347
  },
4772
4348
  currency: {
4773
- min: 0,
4774
- max: "1",
4775
4349
  type: [
4776
4350
  {
4777
4351
  code: "code"
@@ -4784,8 +4358,6 @@
4784
4358
  display: "Narrative",
4785
4359
  properties: {
4786
4360
  id: {
4787
- min: 0,
4788
- max: "1",
4789
4361
  type: [
4790
4362
  {
4791
4363
  code: "string"
@@ -4793,7 +4365,6 @@
4793
4365
  ]
4794
4366
  },
4795
4367
  extension: {
4796
- min: 0,
4797
4368
  max: "*",
4798
4369
  type: [
4799
4370
  {
@@ -4803,7 +4374,6 @@
4803
4374
  },
4804
4375
  status: {
4805
4376
  min: 1,
4806
- max: "1",
4807
4377
  type: [
4808
4378
  {
4809
4379
  code: "code"
@@ -4812,7 +4382,6 @@
4812
4382
  },
4813
4383
  div: {
4814
4384
  min: 1,
4815
- max: "1",
4816
4385
  type: [
4817
4386
  {
4818
4387
  code: "xhtml"
@@ -4825,8 +4394,6 @@
4825
4394
  display: "ParameterDefinition",
4826
4395
  properties: {
4827
4396
  id: {
4828
- min: 0,
4829
- max: "1",
4830
4397
  type: [
4831
4398
  {
4832
4399
  code: "string"
@@ -4834,7 +4401,6 @@
4834
4401
  ]
4835
4402
  },
4836
4403
  extension: {
4837
- min: 0,
4838
4404
  max: "*",
4839
4405
  type: [
4840
4406
  {
@@ -4843,8 +4409,6 @@
4843
4409
  ]
4844
4410
  },
4845
4411
  name: {
4846
- min: 0,
4847
- max: "1",
4848
4412
  type: [
4849
4413
  {
4850
4414
  code: "code"
@@ -4853,7 +4417,6 @@
4853
4417
  },
4854
4418
  use: {
4855
4419
  min: 1,
4856
- max: "1",
4857
4420
  type: [
4858
4421
  {
4859
4422
  code: "code"
@@ -4861,8 +4424,6 @@
4861
4424
  ]
4862
4425
  },
4863
4426
  min: {
4864
- min: 0,
4865
- max: "1",
4866
4427
  type: [
4867
4428
  {
4868
4429
  code: "integer"
@@ -4870,8 +4431,6 @@
4870
4431
  ]
4871
4432
  },
4872
4433
  max: {
4873
- min: 0,
4874
- max: "1",
4875
4434
  type: [
4876
4435
  {
4877
4436
  code: "string"
@@ -4879,8 +4438,6 @@
4879
4438
  ]
4880
4439
  },
4881
4440
  documentation: {
4882
- min: 0,
4883
- max: "1",
4884
4441
  type: [
4885
4442
  {
4886
4443
  code: "string"
@@ -4889,7 +4446,6 @@
4889
4446
  },
4890
4447
  type: {
4891
4448
  min: 1,
4892
- max: "1",
4893
4449
  type: [
4894
4450
  {
4895
4451
  code: "code"
@@ -4897,8 +4453,6 @@
4897
4453
  ]
4898
4454
  },
4899
4455
  profile: {
4900
- min: 0,
4901
- max: "1",
4902
4456
  type: [
4903
4457
  {
4904
4458
  code: "canonical",
@@ -4914,8 +4468,6 @@
4914
4468
  display: "Period",
4915
4469
  properties: {
4916
4470
  id: {
4917
- min: 0,
4918
- max: "1",
4919
4471
  type: [
4920
4472
  {
4921
4473
  code: "string"
@@ -4923,7 +4475,6 @@
4923
4475
  ]
4924
4476
  },
4925
4477
  extension: {
4926
- min: 0,
4927
4478
  max: "*",
4928
4479
  type: [
4929
4480
  {
@@ -4932,8 +4483,6 @@
4932
4483
  ]
4933
4484
  },
4934
4485
  start: {
4935
- min: 0,
4936
- max: "1",
4937
4486
  type: [
4938
4487
  {
4939
4488
  code: "dateTime"
@@ -4941,8 +4490,6 @@
4941
4490
  ]
4942
4491
  },
4943
4492
  end: {
4944
- min: 0,
4945
- max: "1",
4946
4493
  type: [
4947
4494
  {
4948
4495
  code: "dateTime"
@@ -4955,8 +4502,6 @@
4955
4502
  display: "Population",
4956
4503
  properties: {
4957
4504
  id: {
4958
- min: 0,
4959
- max: "1",
4960
4505
  type: [
4961
4506
  {
4962
4507
  code: "string"
@@ -4964,7 +4509,6 @@
4964
4509
  ]
4965
4510
  },
4966
4511
  extension: {
4967
- min: 0,
4968
4512
  max: "*",
4969
4513
  type: [
4970
4514
  {
@@ -4973,7 +4517,6 @@
4973
4517
  ]
4974
4518
  },
4975
4519
  modifierExtension: {
4976
- min: 0,
4977
4520
  max: "*",
4978
4521
  type: [
4979
4522
  {
@@ -4982,8 +4525,6 @@
4982
4525
  ]
4983
4526
  },
4984
4527
  "age[x]": {
4985
- min: 0,
4986
- max: "1",
4987
4528
  type: [
4988
4529
  {
4989
4530
  code: "Range"
@@ -4994,8 +4535,6 @@
4994
4535
  ]
4995
4536
  },
4996
4537
  gender: {
4997
- min: 0,
4998
- max: "1",
4999
4538
  type: [
5000
4539
  {
5001
4540
  code: "CodeableConcept"
@@ -5003,8 +4542,6 @@
5003
4542
  ]
5004
4543
  },
5005
4544
  race: {
5006
- min: 0,
5007
- max: "1",
5008
4545
  type: [
5009
4546
  {
5010
4547
  code: "CodeableConcept"
@@ -5012,8 +4549,6 @@
5012
4549
  ]
5013
4550
  },
5014
4551
  physiologicalCondition: {
5015
- min: 0,
5016
- max: "1",
5017
4552
  type: [
5018
4553
  {
5019
4554
  code: "CodeableConcept"
@@ -5026,8 +4561,6 @@
5026
4561
  display: "ProdCharacteristic",
5027
4562
  properties: {
5028
4563
  id: {
5029
- min: 0,
5030
- max: "1",
5031
4564
  type: [
5032
4565
  {
5033
4566
  code: "string"
@@ -5035,7 +4568,6 @@
5035
4568
  ]
5036
4569
  },
5037
4570
  extension: {
5038
- min: 0,
5039
4571
  max: "*",
5040
4572
  type: [
5041
4573
  {
@@ -5044,7 +4576,6 @@
5044
4576
  ]
5045
4577
  },
5046
4578
  modifierExtension: {
5047
- min: 0,
5048
4579
  max: "*",
5049
4580
  type: [
5050
4581
  {
@@ -5053,8 +4584,6 @@
5053
4584
  ]
5054
4585
  },
5055
4586
  height: {
5056
- min: 0,
5057
- max: "1",
5058
4587
  type: [
5059
4588
  {
5060
4589
  code: "Quantity"
@@ -5062,8 +4591,6 @@
5062
4591
  ]
5063
4592
  },
5064
4593
  width: {
5065
- min: 0,
5066
- max: "1",
5067
4594
  type: [
5068
4595
  {
5069
4596
  code: "Quantity"
@@ -5071,8 +4598,6 @@
5071
4598
  ]
5072
4599
  },
5073
4600
  depth: {
5074
- min: 0,
5075
- max: "1",
5076
4601
  type: [
5077
4602
  {
5078
4603
  code: "Quantity"
@@ -5080,8 +4605,6 @@
5080
4605
  ]
5081
4606
  },
5082
4607
  weight: {
5083
- min: 0,
5084
- max: "1",
5085
4608
  type: [
5086
4609
  {
5087
4610
  code: "Quantity"
@@ -5089,8 +4612,6 @@
5089
4612
  ]
5090
4613
  },
5091
4614
  nominalVolume: {
5092
- min: 0,
5093
- max: "1",
5094
4615
  type: [
5095
4616
  {
5096
4617
  code: "Quantity"
@@ -5098,8 +4619,6 @@
5098
4619
  ]
5099
4620
  },
5100
4621
  externalDiameter: {
5101
- min: 0,
5102
- max: "1",
5103
4622
  type: [
5104
4623
  {
5105
4624
  code: "Quantity"
@@ -5107,8 +4626,6 @@
5107
4626
  ]
5108
4627
  },
5109
4628
  shape: {
5110
- min: 0,
5111
- max: "1",
5112
4629
  type: [
5113
4630
  {
5114
4631
  code: "string"
@@ -5116,7 +4633,6 @@
5116
4633
  ]
5117
4634
  },
5118
4635
  color: {
5119
- min: 0,
5120
4636
  max: "*",
5121
4637
  type: [
5122
4638
  {
@@ -5125,7 +4641,6 @@
5125
4641
  ]
5126
4642
  },
5127
4643
  imprint: {
5128
- min: 0,
5129
4644
  max: "*",
5130
4645
  type: [
5131
4646
  {
@@ -5134,7 +4649,6 @@
5134
4649
  ]
5135
4650
  },
5136
4651
  image: {
5137
- min: 0,
5138
4652
  max: "*",
5139
4653
  type: [
5140
4654
  {
@@ -5143,8 +4657,6 @@
5143
4657
  ]
5144
4658
  },
5145
4659
  scoring: {
5146
- min: 0,
5147
- max: "1",
5148
4660
  type: [
5149
4661
  {
5150
4662
  code: "CodeableConcept"
@@ -5157,8 +4669,6 @@
5157
4669
  display: "ProductShelfLife",
5158
4670
  properties: {
5159
4671
  id: {
5160
- min: 0,
5161
- max: "1",
5162
4672
  type: [
5163
4673
  {
5164
4674
  code: "string"
@@ -5166,7 +4676,6 @@
5166
4676
  ]
5167
4677
  },
5168
4678
  extension: {
5169
- min: 0,
5170
4679
  max: "*",
5171
4680
  type: [
5172
4681
  {
@@ -5175,7 +4684,6 @@
5175
4684
  ]
5176
4685
  },
5177
4686
  modifierExtension: {
5178
- min: 0,
5179
4687
  max: "*",
5180
4688
  type: [
5181
4689
  {
@@ -5184,8 +4692,6 @@
5184
4692
  ]
5185
4693
  },
5186
4694
  identifier: {
5187
- min: 0,
5188
- max: "1",
5189
4695
  type: [
5190
4696
  {
5191
4697
  code: "Identifier"
@@ -5194,7 +4700,6 @@
5194
4700
  },
5195
4701
  type: {
5196
4702
  min: 1,
5197
- max: "1",
5198
4703
  type: [
5199
4704
  {
5200
4705
  code: "CodeableConcept"
@@ -5203,7 +4708,6 @@
5203
4708
  },
5204
4709
  period: {
5205
4710
  min: 1,
5206
- max: "1",
5207
4711
  type: [
5208
4712
  {
5209
4713
  code: "Quantity"
@@ -5211,7 +4715,6 @@
5211
4715
  ]
5212
4716
  },
5213
4717
  specialPrecautionsForStorage: {
5214
- min: 0,
5215
4718
  max: "*",
5216
4719
  type: [
5217
4720
  {
@@ -5225,8 +4728,6 @@
5225
4728
  display: "Quantity",
5226
4729
  properties: {
5227
4730
  id: {
5228
- min: 0,
5229
- max: "1",
5230
4731
  type: [
5231
4732
  {
5232
4733
  code: "string"
@@ -5234,7 +4735,6 @@
5234
4735
  ]
5235
4736
  },
5236
4737
  extension: {
5237
- min: 0,
5238
4738
  max: "*",
5239
4739
  type: [
5240
4740
  {
@@ -5243,8 +4743,6 @@
5243
4743
  ]
5244
4744
  },
5245
4745
  value: {
5246
- min: 0,
5247
- max: "1",
5248
4746
  type: [
5249
4747
  {
5250
4748
  code: "decimal"
@@ -5252,7 +4750,6 @@
5252
4750
  ]
5253
4751
  },
5254
4752
  comparator: {
5255
- min: 0,
5256
4753
  max: "0",
5257
4754
  type: [
5258
4755
  {
@@ -5261,8 +4758,6 @@
5261
4758
  ]
5262
4759
  },
5263
4760
  unit: {
5264
- min: 0,
5265
- max: "1",
5266
4761
  type: [
5267
4762
  {
5268
4763
  code: "string"
@@ -5270,8 +4765,6 @@
5270
4765
  ]
5271
4766
  },
5272
4767
  system: {
5273
- min: 0,
5274
- max: "1",
5275
4768
  type: [
5276
4769
  {
5277
4770
  code: "uri"
@@ -5279,8 +4772,6 @@
5279
4772
  ]
5280
4773
  },
5281
4774
  code: {
5282
- min: 0,
5283
- max: "1",
5284
4775
  type: [
5285
4776
  {
5286
4777
  code: "code"
@@ -5293,8 +4784,6 @@
5293
4784
  display: "Range",
5294
4785
  properties: {
5295
4786
  id: {
5296
- min: 0,
5297
- max: "1",
5298
4787
  type: [
5299
4788
  {
5300
4789
  code: "string"
@@ -5302,7 +4791,6 @@
5302
4791
  ]
5303
4792
  },
5304
4793
  extension: {
5305
- min: 0,
5306
4794
  max: "*",
5307
4795
  type: [
5308
4796
  {
@@ -5311,8 +4799,6 @@
5311
4799
  ]
5312
4800
  },
5313
4801
  low: {
5314
- min: 0,
5315
- max: "1",
5316
4802
  type: [
5317
4803
  {
5318
4804
  code: "Quantity",
@@ -5323,8 +4809,6 @@
5323
4809
  ]
5324
4810
  },
5325
4811
  high: {
5326
- min: 0,
5327
- max: "1",
5328
4812
  type: [
5329
4813
  {
5330
4814
  code: "Quantity",
@@ -5340,8 +4824,6 @@
5340
4824
  display: "Ratio",
5341
4825
  properties: {
5342
4826
  id: {
5343
- min: 0,
5344
- max: "1",
5345
4827
  type: [
5346
4828
  {
5347
4829
  code: "string"
@@ -5349,7 +4831,6 @@
5349
4831
  ]
5350
4832
  },
5351
4833
  extension: {
5352
- min: 0,
5353
4834
  max: "*",
5354
4835
  type: [
5355
4836
  {
@@ -5358,8 +4839,6 @@
5358
4839
  ]
5359
4840
  },
5360
4841
  numerator: {
5361
- min: 0,
5362
- max: "1",
5363
4842
  type: [
5364
4843
  {
5365
4844
  code: "Quantity"
@@ -5367,8 +4846,6 @@
5367
4846
  ]
5368
4847
  },
5369
4848
  denominator: {
5370
- min: 0,
5371
- max: "1",
5372
4849
  type: [
5373
4850
  {
5374
4851
  code: "Quantity"
@@ -5381,8 +4858,6 @@
5381
4858
  display: "Reference",
5382
4859
  properties: {
5383
4860
  id: {
5384
- min: 0,
5385
- max: "1",
5386
4861
  type: [
5387
4862
  {
5388
4863
  code: "string"
@@ -5390,7 +4865,6 @@
5390
4865
  ]
5391
4866
  },
5392
4867
  extension: {
5393
- min: 0,
5394
4868
  max: "*",
5395
4869
  type: [
5396
4870
  {
@@ -5399,8 +4873,6 @@
5399
4873
  ]
5400
4874
  },
5401
4875
  reference: {
5402
- min: 0,
5403
- max: "1",
5404
4876
  type: [
5405
4877
  {
5406
4878
  code: "string"
@@ -5408,8 +4880,6 @@
5408
4880
  ]
5409
4881
  },
5410
4882
  type: {
5411
- min: 0,
5412
- max: "1",
5413
4883
  type: [
5414
4884
  {
5415
4885
  code: "uri"
@@ -5417,8 +4887,6 @@
5417
4887
  ]
5418
4888
  },
5419
4889
  identifier: {
5420
- min: 0,
5421
- max: "1",
5422
4890
  type: [
5423
4891
  {
5424
4892
  code: "Identifier"
@@ -5426,8 +4894,6 @@
5426
4894
  ]
5427
4895
  },
5428
4896
  display: {
5429
- min: 0,
5430
- max: "1",
5431
4897
  type: [
5432
4898
  {
5433
4899
  code: "string"
@@ -5440,8 +4906,6 @@
5440
4906
  display: "RelatedArtifact",
5441
4907
  properties: {
5442
4908
  id: {
5443
- min: 0,
5444
- max: "1",
5445
4909
  type: [
5446
4910
  {
5447
4911
  code: "string"
@@ -5449,7 +4913,6 @@
5449
4913
  ]
5450
4914
  },
5451
4915
  extension: {
5452
- min: 0,
5453
4916
  max: "*",
5454
4917
  type: [
5455
4918
  {
@@ -5459,7 +4922,6 @@
5459
4922
  },
5460
4923
  type: {
5461
4924
  min: 1,
5462
- max: "1",
5463
4925
  type: [
5464
4926
  {
5465
4927
  code: "code"
@@ -5467,8 +4929,6 @@
5467
4929
  ]
5468
4930
  },
5469
4931
  label: {
5470
- min: 0,
5471
- max: "1",
5472
4932
  type: [
5473
4933
  {
5474
4934
  code: "string"
@@ -5476,8 +4936,6 @@
5476
4936
  ]
5477
4937
  },
5478
4938
  display: {
5479
- min: 0,
5480
- max: "1",
5481
4939
  type: [
5482
4940
  {
5483
4941
  code: "string"
@@ -5485,8 +4943,6 @@
5485
4943
  ]
5486
4944
  },
5487
4945
  citation: {
5488
- min: 0,
5489
- max: "1",
5490
4946
  type: [
5491
4947
  {
5492
4948
  code: "markdown"
@@ -5494,8 +4950,6 @@
5494
4950
  ]
5495
4951
  },
5496
4952
  url: {
5497
- min: 0,
5498
- max: "1",
5499
4953
  type: [
5500
4954
  {
5501
4955
  code: "url"
@@ -5503,8 +4957,6 @@
5503
4957
  ]
5504
4958
  },
5505
4959
  document: {
5506
- min: 0,
5507
- max: "1",
5508
4960
  type: [
5509
4961
  {
5510
4962
  code: "Attachment"
@@ -5512,8 +4964,6 @@
5512
4964
  ]
5513
4965
  },
5514
4966
  resource: {
5515
- min: 0,
5516
- max: "1",
5517
4967
  type: [
5518
4968
  {
5519
4969
  code: "canonical",
@@ -5529,8 +4979,6 @@
5529
4979
  display: "SampledData",
5530
4980
  properties: {
5531
4981
  id: {
5532
- min: 0,
5533
- max: "1",
5534
4982
  type: [
5535
4983
  {
5536
4984
  code: "string"
@@ -5538,7 +4986,6 @@
5538
4986
  ]
5539
4987
  },
5540
4988
  extension: {
5541
- min: 0,
5542
4989
  max: "*",
5543
4990
  type: [
5544
4991
  {
@@ -5548,7 +4995,6 @@
5548
4995
  },
5549
4996
  origin: {
5550
4997
  min: 1,
5551
- max: "1",
5552
4998
  type: [
5553
4999
  {
5554
5000
  code: "Quantity",
@@ -5560,7 +5006,6 @@
5560
5006
  },
5561
5007
  period: {
5562
5008
  min: 1,
5563
- max: "1",
5564
5009
  type: [
5565
5010
  {
5566
5011
  code: "decimal"
@@ -5568,8 +5013,6 @@
5568
5013
  ]
5569
5014
  },
5570
5015
  factor: {
5571
- min: 0,
5572
- max: "1",
5573
5016
  type: [
5574
5017
  {
5575
5018
  code: "decimal"
@@ -5577,8 +5020,6 @@
5577
5020
  ]
5578
5021
  },
5579
5022
  lowerLimit: {
5580
- min: 0,
5581
- max: "1",
5582
5023
  type: [
5583
5024
  {
5584
5025
  code: "decimal"
@@ -5586,8 +5027,6 @@
5586
5027
  ]
5587
5028
  },
5588
5029
  upperLimit: {
5589
- min: 0,
5590
- max: "1",
5591
5030
  type: [
5592
5031
  {
5593
5032
  code: "decimal"
@@ -5596,7 +5035,6 @@
5596
5035
  },
5597
5036
  dimensions: {
5598
5037
  min: 1,
5599
- max: "1",
5600
5038
  type: [
5601
5039
  {
5602
5040
  code: "positiveInt"
@@ -5604,8 +5042,6 @@
5604
5042
  ]
5605
5043
  },
5606
5044
  data: {
5607
- min: 0,
5608
- max: "1",
5609
5045
  type: [
5610
5046
  {
5611
5047
  code: "string"
@@ -5618,8 +5054,6 @@
5618
5054
  display: "Signature",
5619
5055
  properties: {
5620
5056
  id: {
5621
- min: 0,
5622
- max: "1",
5623
5057
  type: [
5624
5058
  {
5625
5059
  code: "string"
@@ -5627,7 +5061,6 @@
5627
5061
  ]
5628
5062
  },
5629
5063
  extension: {
5630
- min: 0,
5631
5064
  max: "*",
5632
5065
  type: [
5633
5066
  {
@@ -5646,7 +5079,6 @@
5646
5079
  },
5647
5080
  when: {
5648
5081
  min: 1,
5649
- max: "1",
5650
5082
  type: [
5651
5083
  {
5652
5084
  code: "instant"
@@ -5655,7 +5087,6 @@
5655
5087
  },
5656
5088
  who: {
5657
5089
  min: 1,
5658
- max: "1",
5659
5090
  type: [
5660
5091
  {
5661
5092
  code: "Reference",
@@ -5671,8 +5102,6 @@
5671
5102
  ]
5672
5103
  },
5673
5104
  onBehalfOf: {
5674
- min: 0,
5675
- max: "1",
5676
5105
  type: [
5677
5106
  {
5678
5107
  code: "Reference",
@@ -5688,8 +5117,6 @@
5688
5117
  ]
5689
5118
  },
5690
5119
  targetFormat: {
5691
- min: 0,
5692
- max: "1",
5693
5120
  type: [
5694
5121
  {
5695
5122
  code: "code"
@@ -5697,8 +5124,6 @@
5697
5124
  ]
5698
5125
  },
5699
5126
  sigFormat: {
5700
- min: 0,
5701
- max: "1",
5702
5127
  type: [
5703
5128
  {
5704
5129
  code: "code"
@@ -5706,8 +5131,6 @@
5706
5131
  ]
5707
5132
  },
5708
5133
  data: {
5709
- min: 0,
5710
- max: "1",
5711
5134
  type: [
5712
5135
  {
5713
5136
  code: "base64Binary"
@@ -5720,8 +5143,6 @@
5720
5143
  display: "SubstanceAmount",
5721
5144
  properties: {
5722
5145
  id: {
5723
- min: 0,
5724
- max: "1",
5725
5146
  type: [
5726
5147
  {
5727
5148
  code: "string"
@@ -5729,7 +5150,6 @@
5729
5150
  ]
5730
5151
  },
5731
5152
  extension: {
5732
- min: 0,
5733
5153
  max: "*",
5734
5154
  type: [
5735
5155
  {
@@ -5738,7 +5158,6 @@
5738
5158
  ]
5739
5159
  },
5740
5160
  modifierExtension: {
5741
- min: 0,
5742
5161
  max: "*",
5743
5162
  type: [
5744
5163
  {
@@ -5747,8 +5166,6 @@
5747
5166
  ]
5748
5167
  },
5749
5168
  "amount[x]": {
5750
- min: 0,
5751
- max: "1",
5752
5169
  type: [
5753
5170
  {
5754
5171
  code: "Quantity"
@@ -5762,8 +5179,6 @@
5762
5179
  ]
5763
5180
  },
5764
5181
  amountType: {
5765
- min: 0,
5766
- max: "1",
5767
5182
  type: [
5768
5183
  {
5769
5184
  code: "CodeableConcept"
@@ -5771,8 +5186,6 @@
5771
5186
  ]
5772
5187
  },
5773
5188
  amountText: {
5774
- min: 0,
5775
- max: "1",
5776
5189
  type: [
5777
5190
  {
5778
5191
  code: "string"
@@ -5780,8 +5193,6 @@
5780
5193
  ]
5781
5194
  },
5782
5195
  referenceRange: {
5783
- min: 0,
5784
- max: "1",
5785
5196
  type: [
5786
5197
  {
5787
5198
  code: "Element"
@@ -5794,8 +5205,6 @@
5794
5205
  display: "SubstanceAmountReferenceRange",
5795
5206
  properties: {
5796
5207
  id: {
5797
- min: 0,
5798
- max: "1",
5799
5208
  type: [
5800
5209
  {
5801
5210
  code: "string"
@@ -5803,7 +5212,6 @@
5803
5212
  ]
5804
5213
  },
5805
5214
  extension: {
5806
- min: 0,
5807
5215
  max: "*",
5808
5216
  type: [
5809
5217
  {
@@ -5812,8 +5220,6 @@
5812
5220
  ]
5813
5221
  },
5814
5222
  lowLimit: {
5815
- min: 0,
5816
- max: "1",
5817
5223
  type: [
5818
5224
  {
5819
5225
  code: "Quantity"
@@ -5821,23 +5227,18 @@
5821
5227
  ]
5822
5228
  },
5823
5229
  highLimit: {
5824
- min: 0,
5825
- max: "1",
5826
5230
  type: [
5827
5231
  {
5828
5232
  code: "Quantity"
5829
5233
  }
5830
5234
  ]
5831
5235
  }
5832
- },
5833
- parentType: "SubstanceAmount"
5236
+ }
5834
5237
  },
5835
5238
  Timing: {
5836
5239
  display: "Timing",
5837
5240
  properties: {
5838
5241
  id: {
5839
- min: 0,
5840
- max: "1",
5841
5242
  type: [
5842
5243
  {
5843
5244
  code: "string"
@@ -5845,7 +5246,6 @@
5845
5246
  ]
5846
5247
  },
5847
5248
  extension: {
5848
- min: 0,
5849
5249
  max: "*",
5850
5250
  type: [
5851
5251
  {
@@ -5854,7 +5254,6 @@
5854
5254
  ]
5855
5255
  },
5856
5256
  modifierExtension: {
5857
- min: 0,
5858
5257
  max: "*",
5859
5258
  type: [
5860
5259
  {
@@ -5863,7 +5262,6 @@
5863
5262
  ]
5864
5263
  },
5865
5264
  event: {
5866
- min: 0,
5867
5265
  max: "*",
5868
5266
  type: [
5869
5267
  {
@@ -5872,8 +5270,6 @@
5872
5270
  ]
5873
5271
  },
5874
5272
  repeat: {
5875
- min: 0,
5876
- max: "1",
5877
5273
  type: [
5878
5274
  {
5879
5275
  code: "Element"
@@ -5881,8 +5277,6 @@
5881
5277
  ]
5882
5278
  },
5883
5279
  code: {
5884
- min: 0,
5885
- max: "1",
5886
5280
  type: [
5887
5281
  {
5888
5282
  code: "CodeableConcept"
@@ -5895,8 +5289,6 @@
5895
5289
  display: "TimingRepeat",
5896
5290
  properties: {
5897
5291
  id: {
5898
- min: 0,
5899
- max: "1",
5900
5292
  type: [
5901
5293
  {
5902
5294
  code: "string"
@@ -5904,7 +5296,6 @@
5904
5296
  ]
5905
5297
  },
5906
5298
  extension: {
5907
- min: 0,
5908
5299
  max: "*",
5909
5300
  type: [
5910
5301
  {
@@ -5913,8 +5304,6 @@
5913
5304
  ]
5914
5305
  },
5915
5306
  "bounds[x]": {
5916
- min: 0,
5917
- max: "1",
5918
5307
  type: [
5919
5308
  {
5920
5309
  code: "Duration"
@@ -5928,8 +5317,6 @@
5928
5317
  ]
5929
5318
  },
5930
5319
  count: {
5931
- min: 0,
5932
- max: "1",
5933
5320
  type: [
5934
5321
  {
5935
5322
  code: "positiveInt"
@@ -5937,8 +5324,6 @@
5937
5324
  ]
5938
5325
  },
5939
5326
  countMax: {
5940
- min: 0,
5941
- max: "1",
5942
5327
  type: [
5943
5328
  {
5944
5329
  code: "positiveInt"
@@ -5946,8 +5331,6 @@
5946
5331
  ]
5947
5332
  },
5948
5333
  duration: {
5949
- min: 0,
5950
- max: "1",
5951
5334
  type: [
5952
5335
  {
5953
5336
  code: "decimal"
@@ -5955,8 +5338,6 @@
5955
5338
  ]
5956
5339
  },
5957
5340
  durationMax: {
5958
- min: 0,
5959
- max: "1",
5960
5341
  type: [
5961
5342
  {
5962
5343
  code: "decimal"
@@ -5964,8 +5345,6 @@
5964
5345
  ]
5965
5346
  },
5966
5347
  durationUnit: {
5967
- min: 0,
5968
- max: "1",
5969
5348
  type: [
5970
5349
  {
5971
5350
  code: "code"
@@ -5973,8 +5352,6 @@
5973
5352
  ]
5974
5353
  },
5975
5354
  frequency: {
5976
- min: 0,
5977
- max: "1",
5978
5355
  type: [
5979
5356
  {
5980
5357
  code: "positiveInt"
@@ -5982,8 +5359,6 @@
5982
5359
  ]
5983
5360
  },
5984
5361
  frequencyMax: {
5985
- min: 0,
5986
- max: "1",
5987
5362
  type: [
5988
5363
  {
5989
5364
  code: "positiveInt"
@@ -5991,8 +5366,6 @@
5991
5366
  ]
5992
5367
  },
5993
5368
  period: {
5994
- min: 0,
5995
- max: "1",
5996
5369
  type: [
5997
5370
  {
5998
5371
  code: "decimal"
@@ -6000,8 +5373,6 @@
6000
5373
  ]
6001
5374
  },
6002
5375
  periodMax: {
6003
- min: 0,
6004
- max: "1",
6005
5376
  type: [
6006
5377
  {
6007
5378
  code: "decimal"
@@ -6009,8 +5380,6 @@
6009
5380
  ]
6010
5381
  },
6011
5382
  periodUnit: {
6012
- min: 0,
6013
- max: "1",
6014
5383
  type: [
6015
5384
  {
6016
5385
  code: "code"
@@ -6018,7 +5387,6 @@
6018
5387
  ]
6019
5388
  },
6020
5389
  dayOfWeek: {
6021
- min: 0,
6022
5390
  max: "*",
6023
5391
  type: [
6024
5392
  {
@@ -6027,7 +5395,6 @@
6027
5395
  ]
6028
5396
  },
6029
5397
  timeOfDay: {
6030
- min: 0,
6031
5398
  max: "*",
6032
5399
  type: [
6033
5400
  {
@@ -6036,7 +5403,6 @@
6036
5403
  ]
6037
5404
  },
6038
5405
  when: {
6039
- min: 0,
6040
5406
  max: "*",
6041
5407
  type: [
6042
5408
  {
@@ -6045,23 +5411,18 @@
6045
5411
  ]
6046
5412
  },
6047
5413
  offset: {
6048
- min: 0,
6049
- max: "1",
6050
5414
  type: [
6051
5415
  {
6052
5416
  code: "unsignedInt"
6053
5417
  }
6054
5418
  ]
6055
5419
  }
6056
- },
6057
- parentType: "Timing"
5420
+ }
6058
5421
  },
6059
5422
  TriggerDefinition: {
6060
5423
  display: "TriggerDefinition",
6061
5424
  properties: {
6062
5425
  id: {
6063
- min: 0,
6064
- max: "1",
6065
5426
  type: [
6066
5427
  {
6067
5428
  code: "string"
@@ -6069,7 +5430,6 @@
6069
5430
  ]
6070
5431
  },
6071
5432
  extension: {
6072
- min: 0,
6073
5433
  max: "*",
6074
5434
  type: [
6075
5435
  {
@@ -6079,7 +5439,6 @@
6079
5439
  },
6080
5440
  type: {
6081
5441
  min: 1,
6082
- max: "1",
6083
5442
  type: [
6084
5443
  {
6085
5444
  code: "code"
@@ -6087,8 +5446,6 @@
6087
5446
  ]
6088
5447
  },
6089
5448
  name: {
6090
- min: 0,
6091
- max: "1",
6092
5449
  type: [
6093
5450
  {
6094
5451
  code: "string"
@@ -6096,8 +5453,6 @@
6096
5453
  ]
6097
5454
  },
6098
5455
  "timing[x]": {
6099
- min: 0,
6100
- max: "1",
6101
5456
  type: [
6102
5457
  {
6103
5458
  code: "Timing"
@@ -6117,7 +5472,6 @@
6117
5472
  ]
6118
5473
  },
6119
5474
  data: {
6120
- min: 0,
6121
5475
  max: "*",
6122
5476
  type: [
6123
5477
  {
@@ -6126,8 +5480,6 @@
6126
5480
  ]
6127
5481
  },
6128
5482
  condition: {
6129
- min: 0,
6130
- max: "1",
6131
5483
  type: [
6132
5484
  {
6133
5485
  code: "Expression"
@@ -6140,8 +5492,6 @@
6140
5492
  display: "UsageContext",
6141
5493
  properties: {
6142
5494
  id: {
6143
- min: 0,
6144
- max: "1",
6145
5495
  type: [
6146
5496
  {
6147
5497
  code: "string"
@@ -6149,7 +5499,6 @@
6149
5499
  ]
6150
5500
  },
6151
5501
  extension: {
6152
- min: 0,
6153
5502
  max: "*",
6154
5503
  type: [
6155
5504
  {
@@ -6159,7 +5508,6 @@
6159
5508
  },
6160
5509
  code: {
6161
5510
  min: 1,
6162
- max: "1",
6163
5511
  type: [
6164
5512
  {
6165
5513
  code: "Coding"
@@ -6168,7 +5516,6 @@
6168
5516
  },
6169
5517
  "value[x]": {
6170
5518
  min: 1,
6171
- max: "1",
6172
5519
  type: [
6173
5520
  {
6174
5521
  code: "CodeableConcept"
@@ -6194,6 +5541,203 @@
6194
5541
  ]
6195
5542
  }
6196
5543
  }
5544
+ },
5545
+ MetadataResource: {
5546
+ display: "MetadataResource",
5547
+ properties: {
5548
+ id: {
5549
+ type: [
5550
+ {
5551
+ code: "string"
5552
+ }
5553
+ ]
5554
+ },
5555
+ meta: {
5556
+ type: [
5557
+ {
5558
+ code: "Meta"
5559
+ }
5560
+ ]
5561
+ },
5562
+ implicitRules: {
5563
+ type: [
5564
+ {
5565
+ code: "uri"
5566
+ }
5567
+ ]
5568
+ },
5569
+ language: {
5570
+ type: [
5571
+ {
5572
+ code: "code"
5573
+ }
5574
+ ]
5575
+ },
5576
+ text: {
5577
+ type: [
5578
+ {
5579
+ code: "Narrative"
5580
+ }
5581
+ ]
5582
+ },
5583
+ contained: {
5584
+ max: "*",
5585
+ type: [
5586
+ {
5587
+ code: "Resource"
5588
+ }
5589
+ ]
5590
+ },
5591
+ extension: {
5592
+ max: "*",
5593
+ type: [
5594
+ {
5595
+ code: "Extension"
5596
+ }
5597
+ ]
5598
+ },
5599
+ modifierExtension: {
5600
+ max: "*",
5601
+ type: [
5602
+ {
5603
+ code: "Extension"
5604
+ }
5605
+ ]
5606
+ },
5607
+ url: {
5608
+ type: [
5609
+ {
5610
+ code: "uri"
5611
+ }
5612
+ ]
5613
+ },
5614
+ version: {
5615
+ type: [
5616
+ {
5617
+ code: "string"
5618
+ }
5619
+ ]
5620
+ },
5621
+ name: {
5622
+ type: [
5623
+ {
5624
+ code: "string"
5625
+ }
5626
+ ]
5627
+ },
5628
+ title: {
5629
+ type: [
5630
+ {
5631
+ code: "string"
5632
+ }
5633
+ ]
5634
+ },
5635
+ status: {
5636
+ min: 1,
5637
+ type: [
5638
+ {
5639
+ code: "code"
5640
+ }
5641
+ ]
5642
+ },
5643
+ experimental: {
5644
+ type: [
5645
+ {
5646
+ code: "boolean"
5647
+ }
5648
+ ]
5649
+ },
5650
+ date: {
5651
+ type: [
5652
+ {
5653
+ code: "dateTime"
5654
+ }
5655
+ ]
5656
+ },
5657
+ publisher: {
5658
+ type: [
5659
+ {
5660
+ code: "string"
5661
+ }
5662
+ ]
5663
+ },
5664
+ contact: {
5665
+ max: "*",
5666
+ type: [
5667
+ {
5668
+ code: "ContactDetail"
5669
+ }
5670
+ ]
5671
+ },
5672
+ description: {
5673
+ type: [
5674
+ {
5675
+ code: "markdown"
5676
+ }
5677
+ ]
5678
+ },
5679
+ useContext: {
5680
+ max: "*",
5681
+ type: [
5682
+ {
5683
+ code: "UsageContext"
5684
+ }
5685
+ ]
5686
+ },
5687
+ jurisdiction: {
5688
+ max: "*",
5689
+ type: [
5690
+ {
5691
+ code: "CodeableConcept"
5692
+ }
5693
+ ]
5694
+ }
5695
+ }
5696
+ },
5697
+ IdentityProvider: {
5698
+ display: "IdentityProvider",
5699
+ properties: {
5700
+ authorizeUrl: {
5701
+ min: 1,
5702
+ type: [
5703
+ {
5704
+ code: "string"
5705
+ }
5706
+ ]
5707
+ },
5708
+ tokenUrl: {
5709
+ min: 1,
5710
+ type: [
5711
+ {
5712
+ code: "string"
5713
+ }
5714
+ ]
5715
+ },
5716
+ userInfoUrl: {
5717
+ min: 1,
5718
+ type: [
5719
+ {
5720
+ code: "string"
5721
+ }
5722
+ ]
5723
+ },
5724
+ clientId: {
5725
+ min: 1,
5726
+ type: [
5727
+ {
5728
+ code: "string"
5729
+ }
5730
+ ]
5731
+ },
5732
+ clientSecret: {
5733
+ min: 1,
5734
+ type: [
5735
+ {
5736
+ code: "string"
5737
+ }
5738
+ ]
5739
+ }
5740
+ }
6197
5741
  }
6198
5742
  };
6199
5743
  var baseSchema = {
@@ -6406,6 +5950,17 @@
6406
5950
  typeSchema.searchParams[searchParam.code] = searchParam;
6407
5951
  }
6408
5952
  }
5953
+ /**
5954
+ * Returns the type name for an ElementDefinition.
5955
+ * @param elementDefinition The element definition.
5956
+ * @returns The Medplum type name.
5957
+ */
5958
+ function getElementDefinitionTypeName(elementDefinition) {
5959
+ const code = elementDefinition.type?.[0]?.code;
5960
+ return code === 'BackboneElement' || code === 'Element'
5961
+ ? buildTypeName(elementDefinition.path?.split('.'))
5962
+ : code;
5963
+ }
6409
5964
  function buildTypeName(components) {
6410
5965
  if (components.length === 1) {
6411
5966
  return components[0];
@@ -6467,8 +6022,8 @@
6467
6022
 
6468
6023
  // PKCE auth based on:
6469
6024
  // https://aws.amazon.com/blogs/security/how-to-add-authentication-single-page-web-application-with-amazon-cognito-oauth2-implementation/
6470
- var _MedplumClient_instances, _MedplumClient_fetch, _MedplumClient_createPdf, _MedplumClient_storage, _MedplumClient_requestCache, _MedplumClient_cacheTime, _MedplumClient_baseUrl, _MedplumClient_authorizeUrl, _MedplumClient_tokenUrl, _MedplumClient_logoutUrl, _MedplumClient_onUnauthenticated, _MedplumClient_clientId, _MedplumClient_clientSecret, _MedplumClient_accessToken, _MedplumClient_refreshToken, _MedplumClient_refreshPromise, _MedplumClient_profilePromise, _MedplumClient_profile, _MedplumClient_config, _MedplumClient_addLogin, _MedplumClient_refreshProfile, _MedplumClient_getCacheEntry, _MedplumClient_setCacheEntry, _MedplumClient_request, _MedplumClient_addFetchOptionsDefaults, _MedplumClient_setRequestContentType, _MedplumClient_setRequestBody, _MedplumClient_handleUnauthenticated, _MedplumClient_requestAuthorization, _MedplumClient_refresh, _MedplumClient_fetchTokens, _MedplumClient_verifyTokens, _MedplumClient_setupStorageListener;
6471
- const MEDPLUM_VERSION = "1.0.6-5860113c";
6025
+ var _MedplumClient_instances, _MedplumClient_fetch, _MedplumClient_createPdf, _MedplumClient_storage, _MedplumClient_requestCache, _MedplumClient_cacheTime, _MedplumClient_baseUrl, _MedplumClient_fhirBaseUrl, _MedplumClient_authorizeUrl, _MedplumClient_tokenUrl, _MedplumClient_logoutUrl, _MedplumClient_onUnauthenticated, _MedplumClient_autoBatchTime, _MedplumClient_autoBatchQueue, _MedplumClient_clientId, _MedplumClient_clientSecret, _MedplumClient_autoBatchTimerId, _MedplumClient_accessToken, _MedplumClient_refreshToken, _MedplumClient_refreshPromise, _MedplumClient_profilePromise, _MedplumClient_profile, _MedplumClient_config, _MedplumClient_addLogin, _MedplumClient_refreshProfile, _MedplumClient_getCacheEntry, _MedplumClient_setCacheEntry, _MedplumClient_request, _MedplumClient_executeAutoBatch, _MedplumClient_addFetchOptionsDefaults, _MedplumClient_setRequestContentType, _MedplumClient_setRequestBody, _MedplumClient_handleUnauthenticated, _MedplumClient_requestAuthorization, _MedplumClient_refresh, _MedplumClient_fetchTokens, _MedplumClient_verifyTokens, _MedplumClient_setupStorageListener;
6026
+ const MEDPLUM_VERSION = "2.0.1-89a5b1c5";
6472
6027
  const DEFAULT_BASE_URL = 'https://api.medplum.com/';
6473
6028
  const DEFAULT_RESOURCE_CACHE_SIZE = 1000;
6474
6029
  const DEFAULT_CACHE_TIME = 60000; // 60 seconds
@@ -6537,12 +6092,16 @@
6537
6092
  _MedplumClient_requestCache.set(this, void 0);
6538
6093
  _MedplumClient_cacheTime.set(this, void 0);
6539
6094
  _MedplumClient_baseUrl.set(this, void 0);
6095
+ _MedplumClient_fhirBaseUrl.set(this, void 0);
6540
6096
  _MedplumClient_authorizeUrl.set(this, void 0);
6541
6097
  _MedplumClient_tokenUrl.set(this, void 0);
6542
6098
  _MedplumClient_logoutUrl.set(this, void 0);
6543
6099
  _MedplumClient_onUnauthenticated.set(this, void 0);
6100
+ _MedplumClient_autoBatchTime.set(this, void 0);
6101
+ _MedplumClient_autoBatchQueue.set(this, void 0);
6544
6102
  _MedplumClient_clientId.set(this, void 0);
6545
6103
  _MedplumClient_clientSecret.set(this, void 0);
6104
+ _MedplumClient_autoBatchTimerId.set(this, void 0);
6546
6105
  _MedplumClient_accessToken.set(this, void 0);
6547
6106
  _MedplumClient_refreshToken.set(this, void 0);
6548
6107
  _MedplumClient_refreshPromise.set(this, void 0);
@@ -6560,11 +6119,14 @@
6560
6119
  __classPrivateFieldSet(this, _MedplumClient_requestCache, new LRUCache(options?.resourceCacheSize ?? DEFAULT_RESOURCE_CACHE_SIZE), "f");
6561
6120
  __classPrivateFieldSet(this, _MedplumClient_cacheTime, options?.cacheTime ?? DEFAULT_CACHE_TIME, "f");
6562
6121
  __classPrivateFieldSet(this, _MedplumClient_baseUrl, ensureTrailingSlash(options?.baseUrl) || DEFAULT_BASE_URL, "f");
6122
+ __classPrivateFieldSet(this, _MedplumClient_fhirBaseUrl, __classPrivateFieldGet(this, _MedplumClient_baseUrl, "f") + 'fhir/R4/', "f");
6563
6123
  __classPrivateFieldSet(this, _MedplumClient_clientId, options?.clientId || '', "f");
6564
6124
  __classPrivateFieldSet(this, _MedplumClient_authorizeUrl, options?.authorizeUrl || __classPrivateFieldGet(this, _MedplumClient_baseUrl, "f") + 'oauth2/authorize', "f");
6565
6125
  __classPrivateFieldSet(this, _MedplumClient_tokenUrl, options?.tokenUrl || __classPrivateFieldGet(this, _MedplumClient_baseUrl, "f") + 'oauth2/token', "f");
6566
6126
  __classPrivateFieldSet(this, _MedplumClient_logoutUrl, options?.logoutUrl || __classPrivateFieldGet(this, _MedplumClient_baseUrl, "f") + 'oauth2/logout', "f");
6567
6127
  __classPrivateFieldSet(this, _MedplumClient_onUnauthenticated, options?.onUnauthenticated, "f");
6128
+ __classPrivateFieldSet(this, _MedplumClient_autoBatchTime, options?.autoBatchTime ?? 0, "f");
6129
+ __classPrivateFieldSet(this, _MedplumClient_autoBatchQueue, [], "f");
6568
6130
  const activeLogin = this.getActiveLogin();
6569
6131
  if (activeLogin) {
6570
6132
  __classPrivateFieldSet(this, _MedplumClient_accessToken, activeLogin.accessToken, "f");
@@ -6589,6 +6151,15 @@
6589
6151
  */
6590
6152
  clear() {
6591
6153
  __classPrivateFieldGet(this, _MedplumClient_storage, "f").clear();
6154
+ this.clearActiveLogin();
6155
+ }
6156
+ /**
6157
+ * Clears the active login from local storage.
6158
+ * Does not clear all local storage (such as other logins).
6159
+ * @category Authentication
6160
+ */
6161
+ clearActiveLogin() {
6162
+ __classPrivateFieldGet(this, _MedplumClient_storage, "f").setString('activeLogin', undefined);
6592
6163
  __classPrivateFieldGet(this, _MedplumClient_requestCache, "f").clear();
6593
6164
  __classPrivateFieldSet(this, _MedplumClient_accessToken, undefined, "f");
6594
6165
  __classPrivateFieldSet(this, _MedplumClient_refreshToken, undefined, "f");
@@ -6636,9 +6207,27 @@
6636
6207
  if (cached) {
6637
6208
  return cached.value;
6638
6209
  }
6639
- const promise = new ReadablePromise(__classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, 'GET', url, options));
6640
- __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_setCacheEntry).call(this, url, promise);
6641
- return promise;
6210
+ let promise;
6211
+ if (url.startsWith(__classPrivateFieldGet(this, _MedplumClient_fhirBaseUrl, "f")) && __classPrivateFieldGet(this, _MedplumClient_autoBatchTime, "f") > 0) {
6212
+ promise = new Promise((resolve, reject) => {
6213
+ __classPrivateFieldGet(this, _MedplumClient_autoBatchQueue, "f").push({
6214
+ method: 'GET',
6215
+ url: url.replace(__classPrivateFieldGet(this, _MedplumClient_fhirBaseUrl, "f"), ''),
6216
+ options,
6217
+ resolve,
6218
+ reject,
6219
+ });
6220
+ if (!__classPrivateFieldGet(this, _MedplumClient_autoBatchTimerId, "f")) {
6221
+ __classPrivateFieldSet(this, _MedplumClient_autoBatchTimerId, setTimeout(() => __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_executeAutoBatch).call(this), __classPrivateFieldGet(this, _MedplumClient_autoBatchTime, "f")), "f");
6222
+ }
6223
+ });
6224
+ }
6225
+ else {
6226
+ promise = __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, 'GET', url, options);
6227
+ }
6228
+ const readablePromise = new ReadablePromise(promise);
6229
+ __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_setCacheEntry).call(this, url, readablePromise);
6230
+ return readablePromise;
6642
6231
  }
6643
6232
  /**
6644
6233
  * Makes an HTTP POST request to the specified URL.
@@ -6740,11 +6329,11 @@
6740
6329
  * @returns Promise to the authentication response.
6741
6330
  */
6742
6331
  async startNewUser(newUserRequest) {
6743
- await this.startPkce();
6332
+ const { codeChallengeMethod, codeChallenge } = await this.startPkce();
6744
6333
  return this.post('auth/newuser', {
6745
6334
  ...newUserRequest,
6746
- codeChallengeMethod: 'S256',
6747
- codeChallenge: sessionStorage.getItem('codeChallenge'),
6335
+ codeChallengeMethod,
6336
+ codeChallenge,
6748
6337
  });
6749
6338
  }
6750
6339
  /**
@@ -6776,13 +6365,10 @@
6776
6365
  * @returns Promise to the authentication response.
6777
6366
  */
6778
6367
  async startLogin(loginRequest) {
6779
- const { codeChallenge, codeChallengeMethod } = this.getCodeChallenge(loginRequest);
6780
6368
  return this.post('auth/login', {
6781
- ...loginRequest,
6369
+ ...(await this.ensureCodeChallenge(loginRequest)),
6782
6370
  clientId: loginRequest.clientId ?? __classPrivateFieldGet(this, _MedplumClient_clientId, "f"),
6783
6371
  scope: loginRequest.scope,
6784
- codeChallengeMethod,
6785
- codeChallenge,
6786
6372
  });
6787
6373
  }
6788
6374
  /**
@@ -6794,30 +6380,25 @@
6794
6380
  * @returns Promise to the authentication response.
6795
6381
  */
6796
6382
  async startGoogleLogin(loginRequest) {
6797
- const { codeChallenge, codeChallengeMethod } = this.getCodeChallenge(loginRequest);
6798
6383
  return this.post('auth/google', {
6799
- ...loginRequest,
6384
+ ...(await this.ensureCodeChallenge(loginRequest)),
6800
6385
  clientId: loginRequest.clientId ?? __classPrivateFieldGet(this, _MedplumClient_clientId, "f"),
6801
6386
  scope: loginRequest.scope,
6802
- codeChallengeMethod,
6803
- codeChallenge,
6804
6387
  });
6805
6388
  }
6806
- getCodeChallenge(loginRequest) {
6389
+ /**
6390
+ * Returns the PKCE code challenge and method.
6391
+ * If the login request already includes a code challenge, it is returned.
6392
+ * Otherwise, a new PKCE code challenge is generated.
6393
+ * @category Authentication
6394
+ * @param loginRequest The original login request.
6395
+ * @returns The PKCE code challenge and method.
6396
+ */
6397
+ async ensureCodeChallenge(loginRequest) {
6807
6398
  if (loginRequest.codeChallenge) {
6808
- return {
6809
- codeChallenge: loginRequest.codeChallenge,
6810
- codeChallengeMethod: loginRequest.codeChallengeMethod,
6811
- };
6812
- }
6813
- const codeChallenge = sessionStorage.getItem('codeChallenge');
6814
- if (codeChallenge) {
6815
- return {
6816
- codeChallenge,
6817
- codeChallengeMethod: 'S256',
6818
- };
6399
+ return loginRequest;
6819
6400
  }
6820
- return {};
6401
+ return { ...loginRequest, ...(await this.startPkce()) };
6821
6402
  }
6822
6403
  /**
6823
6404
  * Signs out locally.
@@ -6832,12 +6413,13 @@
6832
6413
  * Returns true if the user is signed in.
6833
6414
  * This may result in navigating away to the sign in page.
6834
6415
  * @category Authentication
6416
+ * @param loginParams Optional login parameters.
6835
6417
  */
6836
- async signInWithRedirect() {
6418
+ async signInWithRedirect(loginParams) {
6837
6419
  const urlParams = new URLSearchParams(window.location.search);
6838
6420
  const code = urlParams.get('code');
6839
6421
  if (!code) {
6840
- await __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_requestAuthorization).call(this);
6422
+ await __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_requestAuthorization).call(this, loginParams);
6841
6423
  return undefined;
6842
6424
  }
6843
6425
  else {
@@ -6852,6 +6434,23 @@
6852
6434
  signOutWithRedirect() {
6853
6435
  window.location.assign(__classPrivateFieldGet(this, _MedplumClient_logoutUrl, "f"));
6854
6436
  }
6437
+ /**
6438
+ * Initiates sign in with an external identity provider.
6439
+ * @param authorizeUrl The external authorization URL.
6440
+ * @param clientId The external client ID.
6441
+ * @param redirectUri The external identity provider redirect URI.
6442
+ * @param baseLogin The Medplum login request.
6443
+ */
6444
+ async signInWithExternalAuth(authorizeUrl, clientId, redirectUri, baseLogin) {
6445
+ const loginRequest = await this.ensureCodeChallenge(baseLogin);
6446
+ const url = new URL(authorizeUrl);
6447
+ url.searchParams.set('response_type', 'code');
6448
+ url.searchParams.set('client_id', clientId);
6449
+ url.searchParams.set('redirect_uri', redirectUri);
6450
+ url.searchParams.set('scope', 'openid profile email');
6451
+ url.searchParams.set('state', JSON.stringify(loginRequest));
6452
+ window.location.assign(url.toString());
6453
+ }
6855
6454
  /**
6856
6455
  * Builds a FHIR URL from a collection of URL path components.
6857
6456
  * For example, `buildUrl('/Patient', '123')` returns `fhir/R4/Patient/123`.
@@ -6860,7 +6459,7 @@
6860
6459
  * @returns The well-formed FHIR URL.
6861
6460
  */
6862
6461
  fhirUrl(...path) {
6863
- return new URL(__classPrivateFieldGet(this, _MedplumClient_baseUrl, "f") + 'fhir/R4/' + path.join('/'));
6462
+ return new URL(__classPrivateFieldGet(this, _MedplumClient_fhirBaseUrl, "f") + path.join('/'));
6864
6463
  }
6865
6464
  /**
6866
6465
  * Builds a FHIR search URL from a search query or structured query object.
@@ -7690,13 +7289,11 @@
7690
7289
  * @category Authentication
7691
7290
  */
7692
7291
  async setActiveLogin(login) {
7292
+ this.clearActiveLogin();
7693
7293
  __classPrivateFieldSet(this, _MedplumClient_accessToken, login.accessToken, "f");
7694
7294
  __classPrivateFieldSet(this, _MedplumClient_refreshToken, login.refreshToken, "f");
7695
- __classPrivateFieldSet(this, _MedplumClient_profile, undefined, "f");
7696
- __classPrivateFieldSet(this, _MedplumClient_config, undefined, "f");
7697
7295
  __classPrivateFieldGet(this, _MedplumClient_storage, "f").setObject('activeLogin', login);
7698
7296
  __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_addLogin).call(this, login);
7699
- __classPrivateFieldGet(this, _MedplumClient_requestCache, "f").clear();
7700
7297
  __classPrivateFieldSet(this, _MedplumClient_refreshPromise, undefined, "f");
7701
7298
  await __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_refreshProfile).call(this);
7702
7299
  }
@@ -7775,6 +7372,7 @@
7775
7372
  const arrayHash = await encryptSHA256(codeVerifier);
7776
7373
  const codeChallenge = arrayBufferToBase64(arrayHash).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
7777
7374
  sessionStorage.setItem('codeChallenge', codeChallenge);
7375
+ return { codeChallengeMethod: 'S256', codeChallenge };
7778
7376
  }
7779
7377
  /**
7780
7378
  * Processes an OAuth authorization code.
@@ -7811,7 +7409,7 @@
7811
7409
  return __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_fetchTokens).call(this, formBody);
7812
7410
  }
7813
7411
  }
7814
- _MedplumClient_fetch = new WeakMap(), _MedplumClient_createPdf = new WeakMap(), _MedplumClient_storage = new WeakMap(), _MedplumClient_requestCache = new WeakMap(), _MedplumClient_cacheTime = new WeakMap(), _MedplumClient_baseUrl = new WeakMap(), _MedplumClient_authorizeUrl = new WeakMap(), _MedplumClient_tokenUrl = new WeakMap(), _MedplumClient_logoutUrl = new WeakMap(), _MedplumClient_onUnauthenticated = new WeakMap(), _MedplumClient_clientId = new WeakMap(), _MedplumClient_clientSecret = new WeakMap(), _MedplumClient_accessToken = new WeakMap(), _MedplumClient_refreshToken = new WeakMap(), _MedplumClient_refreshPromise = new WeakMap(), _MedplumClient_profilePromise = new WeakMap(), _MedplumClient_profile = new WeakMap(), _MedplumClient_config = new WeakMap(), _MedplumClient_instances = new WeakSet(), _MedplumClient_addLogin = function _MedplumClient_addLogin(newLogin) {
7412
+ _MedplumClient_fetch = new WeakMap(), _MedplumClient_createPdf = new WeakMap(), _MedplumClient_storage = new WeakMap(), _MedplumClient_requestCache = new WeakMap(), _MedplumClient_cacheTime = new WeakMap(), _MedplumClient_baseUrl = new WeakMap(), _MedplumClient_fhirBaseUrl = new WeakMap(), _MedplumClient_authorizeUrl = new WeakMap(), _MedplumClient_tokenUrl = new WeakMap(), _MedplumClient_logoutUrl = new WeakMap(), _MedplumClient_onUnauthenticated = new WeakMap(), _MedplumClient_autoBatchTime = new WeakMap(), _MedplumClient_autoBatchQueue = new WeakMap(), _MedplumClient_clientId = new WeakMap(), _MedplumClient_clientSecret = new WeakMap(), _MedplumClient_autoBatchTimerId = new WeakMap(), _MedplumClient_accessToken = new WeakMap(), _MedplumClient_refreshToken = new WeakMap(), _MedplumClient_refreshPromise = new WeakMap(), _MedplumClient_profilePromise = new WeakMap(), _MedplumClient_profile = new WeakMap(), _MedplumClient_config = new WeakMap(), _MedplumClient_instances = new WeakSet(), _MedplumClient_addLogin = function _MedplumClient_addLogin(newLogin) {
7815
7413
  const logins = this.getLogins().filter((login) => login.profile?.reference !== newLogin.profile?.reference);
7816
7414
  logins.push(newLogin);
7817
7415
  __classPrivateFieldGet(this, _MedplumClient_storage, "f").setObject('logins', logins);
@@ -7872,6 +7470,43 @@
7872
7470
  throw obj;
7873
7471
  }
7874
7472
  return obj;
7473
+ }, _MedplumClient_executeAutoBatch =
7474
+ /**
7475
+ * Executes a batch of requests that were automatically batched together.
7476
+ */
7477
+ async function _MedplumClient_executeAutoBatch() {
7478
+ // Get the current queue
7479
+ const entries = [...__classPrivateFieldGet(this, _MedplumClient_autoBatchQueue, "f")];
7480
+ // Clear the queue
7481
+ __classPrivateFieldGet(this, _MedplumClient_autoBatchQueue, "f").length = 0;
7482
+ // Clear the timer
7483
+ __classPrivateFieldSet(this, _MedplumClient_autoBatchTimerId, undefined, "f");
7484
+ // If there is only one request in the batch, just execute it
7485
+ if (entries.length === 1) {
7486
+ const entry = entries[0];
7487
+ entry.resolve(await __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, entry.method, __classPrivateFieldGet(this, _MedplumClient_fhirBaseUrl, "f") + entry.url, entry.options));
7488
+ return;
7489
+ }
7490
+ // Build the batch request
7491
+ const batch = {
7492
+ resourceType: 'Bundle',
7493
+ type: 'batch',
7494
+ entry: entries.map((e) => ({
7495
+ request: {
7496
+ method: e.method,
7497
+ url: e.url,
7498
+ },
7499
+ resource: e.options.body ? JSON.parse(e.options.body) : undefined,
7500
+ })),
7501
+ };
7502
+ // Execute the batch request
7503
+ const response = (await this.post('fhir/R4', batch));
7504
+ // Process the response
7505
+ for (let i = 0; i < entries.length; i++) {
7506
+ const entry = entries[i];
7507
+ const responseEntry = response.entry?.[i];
7508
+ entry.resolve(responseEntry?.resource);
7509
+ }
7875
7510
  }, _MedplumClient_addFetchOptionsDefaults = function _MedplumClient_addFetchOptionsDefaults(options) {
7876
7511
  if (!options.headers) {
7877
7512
  options.headers = {};
@@ -7910,7 +7545,7 @@
7910
7545
  if (__classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_refresh).call(this)) {
7911
7546
  return __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_request).call(this, method, url, options);
7912
7547
  }
7913
- this.clear();
7548
+ this.clearActiveLogin();
7914
7549
  if (__classPrivateFieldGet(this, _MedplumClient_onUnauthenticated, "f")) {
7915
7550
  __classPrivateFieldGet(this, _MedplumClient_onUnauthenticated, "f").call(this);
7916
7551
  }
@@ -7921,15 +7556,16 @@
7921
7556
  * Clears all auth state including local storage and session storage.
7922
7557
  * See: https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint
7923
7558
  */
7924
- async function _MedplumClient_requestAuthorization() {
7925
- await this.startPkce();
7559
+ async function _MedplumClient_requestAuthorization(loginParams) {
7560
+ const loginRequest = await this.ensureCodeChallenge(loginParams || {});
7926
7561
  const url = new URL(__classPrivateFieldGet(this, _MedplumClient_authorizeUrl, "f"));
7927
7562
  url.searchParams.set('response_type', 'code');
7928
7563
  url.searchParams.set('state', sessionStorage.getItem('pkceState'));
7929
- url.searchParams.set('client_id', __classPrivateFieldGet(this, _MedplumClient_clientId, "f"));
7930
- url.searchParams.set('redirect_uri', getBaseUrl());
7931
- url.searchParams.set('code_challenge_method', 'S256');
7932
- url.searchParams.set('code_challenge', sessionStorage.getItem('codeChallenge'));
7564
+ url.searchParams.set('client_id', loginRequest.clientId || __classPrivateFieldGet(this, _MedplumClient_clientId, "f"));
7565
+ url.searchParams.set('redirect_uri', loginRequest.redirectUri || getBaseUrl());
7566
+ url.searchParams.set('code_challenge_method', loginRequest.codeChallengeMethod);
7567
+ url.searchParams.set('code_challenge', loginRequest.codeChallenge);
7568
+ url.searchParams.set('scope', loginRequest.scope || 'openid profile');
7933
7569
  window.location.assign(url.toString());
7934
7570
  }, _MedplumClient_refresh = function _MedplumClient_refresh() {
7935
7571
  if (__classPrivateFieldGet(this, _MedplumClient_refreshPromise, "f")) {
@@ -7955,20 +7591,19 @@
7955
7591
  * @param formBody Token parameters in URL encoded format.
7956
7592
  */
7957
7593
  async function _MedplumClient_fetchTokens(formBody) {
7958
- return __classPrivateFieldGet(this, _MedplumClient_fetch, "f").call(this, __classPrivateFieldGet(this, _MedplumClient_tokenUrl, "f"), {
7594
+ const response = await __classPrivateFieldGet(this, _MedplumClient_fetch, "f").call(this, __classPrivateFieldGet(this, _MedplumClient_tokenUrl, "f"), {
7959
7595
  method: 'POST',
7960
7596
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
7961
7597
  body: formBody,
7962
7598
  credentials: 'include',
7963
- })
7964
- .then((response) => {
7965
- if (!response.ok) {
7966
- throw new Error('Failed to fetch tokens');
7967
- }
7968
- return response.json();
7969
- })
7970
- .then((tokens) => __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_verifyTokens).call(this, tokens))
7971
- .then(() => this.getProfile());
7599
+ });
7600
+ if (!response.ok) {
7601
+ this.clearActiveLogin();
7602
+ throw new Error('Failed to fetch tokens');
7603
+ }
7604
+ const tokens = await response.json();
7605
+ await __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_verifyTokens).call(this, tokens);
7606
+ return this.getProfile();
7972
7607
  }, _MedplumClient_verifyTokens =
7973
7608
  /**
7974
7609
  * Verifies the tokens received from the auth server.
@@ -7981,15 +7616,15 @@
7981
7616
  // Verify token has not expired
7982
7617
  const tokenPayload = parseJWTPayload(token);
7983
7618
  if (Date.now() >= tokenPayload.exp * 1000) {
7984
- this.clear();
7619
+ this.clearActiveLogin();
7985
7620
  throw new Error('Token expired');
7986
7621
  }
7987
7622
  // Verify app_client_id
7988
7623
  if (__classPrivateFieldGet(this, _MedplumClient_clientId, "f") && tokenPayload.client_id !== __classPrivateFieldGet(this, _MedplumClient_clientId, "f")) {
7989
- this.clear();
7624
+ this.clearActiveLogin();
7990
7625
  throw new Error('Token was not issued for this audience');
7991
7626
  }
7992
- await this.setActiveLogin({
7627
+ return this.setActiveLogin({
7993
7628
  accessToken: token,
7994
7629
  refreshToken: tokens.refresh_token,
7995
7630
  project: tokens.project,
@@ -11730,7 +11365,9 @@
11730
11365
  exports.getDateProperty = getDateProperty;
11731
11366
  exports.getDisplayString = getDisplayString;
11732
11367
  exports.getElementDefinition = getElementDefinition;
11368
+ exports.getElementDefinitionTypeName = getElementDefinitionTypeName;
11733
11369
  exports.getExpressionForResourceType = getExpressionForResourceType;
11370
+ exports.getExtension = getExtension;
11734
11371
  exports.getExtensionValue = getExtensionValue;
11735
11372
  exports.getIdentifier = getIdentifier;
11736
11373
  exports.getImageSrc = getImageSrc;