formbuilder-lhcforms 10.0.3 → 10.0.5

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.
@@ -839,17 +839,20 @@
839
839
  {
840
840
  "type": "string",
841
841
  "enum": ["answer-option"],
842
- "title": "Answer options"
842
+ "title": "Answer options",
843
+ "dataType": ["all"]
843
844
  },
844
845
  {
845
846
  "type": "string",
846
847
  "enum": ["snomed-value-set"],
847
- "title": "SNOMED answer value set"
848
+ "title": "SNOMED answer value set",
849
+ "dataType": ["coding"]
848
850
  },
849
851
  {
850
852
  "type": "string",
851
853
  "enum": ["value-set"],
852
- "title": "Answer value set URI"
854
+ "title": "Answer value set URI",
855
+ "dataType": ["coding"]
853
856
  }
854
857
  ],
855
858
  "default": "answer-option",
@@ -1084,7 +1087,11 @@
1084
1087
  "description": "Indicates whether the answer value is selected when the list of possible answers is initially shown.",
1085
1088
  "title": "Initial selected",
1086
1089
  "pattern": "^true|false$",
1087
- "type": "boolean"
1090
+ "type": "boolean",
1091
+ "visibleIf": {
1092
+ "/type": ["$EXP$ target.value == 'integer' || target.value == 'date' || target.value == 'time'|| target.value == 'string' || target.value == 'text' || target.value == 'coding'"]
1093
+ },
1094
+ "widget": {"id": "hidden"}
1088
1095
  }
1089
1096
  },
1090
1097
  "additionalProperties": false,
@@ -1094,6 +1101,15 @@
1094
1101
  "title": "Answer choices",
1095
1102
  "visibleIf": {
1096
1103
  "__$answerOptionMethods": ["answer-option"]
1104
+ /*
1105
+ "allOf": [
1106
+ {
1107
+ "/__$answerOptionMethods": ["answer-option"]
1108
+ },
1109
+ {
1110
+ "__$valueMethod": ["$EXP$ target.value != 'compute-initial' && target.value != 'compute-continuously' "]
1111
+ }
1112
+ ] */
1097
1113
  },
1098
1114
  "widget": {
1099
1115
  "id": "answer-option",
@@ -1282,7 +1298,47 @@
1282
1298
  "controlClasses": "col p-0"
1283
1299
  }
1284
1300
  },
1285
-
1301
+ "__$valueMethod": {
1302
+ "description": "Specify how the question obtains its initial values.",
1303
+ "title": "Value method",
1304
+ "visibleIf": {
1305
+ "/type": ["$EXP$ target.value != 'group' && target.value != 'display' "]
1306
+ },
1307
+ "oneOf": [
1308
+ {
1309
+ "type": "string",
1310
+ "enum": ["type-initial"],
1311
+ "title": "Type initial value"
1312
+ },
1313
+ {
1314
+ "type": "string",
1315
+ "enum": ["pick-initial"],
1316
+ "title": "Pick initial value"
1317
+ },
1318
+ {
1319
+ "type": "string",
1320
+ "enum": ["compute-initial"],
1321
+ "title": "Compute initial value"
1322
+ },
1323
+ {
1324
+ "type": "string",
1325
+ "enum": ["compute-continuously"],
1326
+ "title": "Continuously compute value"
1327
+ },
1328
+ {
1329
+ "type": "string",
1330
+ "enum": ["none"],
1331
+ "title": "None"
1332
+ }
1333
+ ],
1334
+ "type": "string",
1335
+ "widget": {
1336
+ "id": "value-method",
1337
+ "labelPosition": "left",
1338
+ "labelClasses": "col-2 ps-0 pe-1",
1339
+ "controlClasses": "col-auto btn-group btn-group-sm m-auto p-0"
1340
+ }
1341
+ },
1286
1342
  "initial": {
1287
1343
  "description": "One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.",
1288
1344
  "items": {
@@ -1338,6 +1394,9 @@
1338
1394
  "title": "Value decimal",
1339
1395
  "visibleIf": {
1340
1396
  "/type": ["decimal"]
1397
+ },
1398
+ "widget": {
1399
+ "id": "initial-number"
1341
1400
  }
1342
1401
  },
1343
1402
  "valueInteger": {
@@ -1347,6 +1406,9 @@
1347
1406
  "title": "Value integer",
1348
1407
  "visibleIf": {
1349
1408
  "/type": ["integer"]
1409
+ },
1410
+ "widget": {
1411
+ "id": "initial-number"
1350
1412
  }
1351
1413
  },
1352
1414
  "valueDate": {
@@ -1503,7 +1565,10 @@
1503
1565
  "display": {
1504
1566
  "description": "A representation of the meaning of the code in the system, following the rules of the system.",
1505
1567
  "pattern": "^[ \\r\\n\\t\\S]+$",
1506
- "type": "string"
1568
+ "type": "string",
1569
+ "widget": {
1570
+ "id": "answer-value-set-coding-display"
1571
+ }
1507
1572
  },
1508
1573
  "userSelected": {
1509
1574
  "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
@@ -1516,14 +1581,12 @@
1516
1581
  "visibleIf": {
1517
1582
  "allOf": [
1518
1583
  {
1519
- "/__$answerOptionMethods": ["answer-option"]
1584
+ "/__$answerOptionMethods": ["answer-option", "snomed-value-set", "value-set"]
1520
1585
  },
1521
1586
  {
1522
1587
  "/type": ["$EXP$ target.value == 'coding'"]
1523
1588
  }
1524
1589
  ],
1525
-
1526
- "/__$answerOptionMethods": ["answer-option"]
1527
1590
  },
1528
1591
  "widget": {
1529
1592
  "id": "hidden"
@@ -1640,7 +1703,31 @@
1640
1703
  "type": "array",
1641
1704
  "title": "Initial value",
1642
1705
  "visibleIf": {
1643
- "/type": ["$EXP$ target.value != 'group' && target.value != 'display' && target.value != 'coding'"]
1706
+ "oneOf": [
1707
+ {
1708
+ "__$valueMethod": ["type-initial"]
1709
+ },
1710
+ {
1711
+ "allOf": [
1712
+ {
1713
+ "__$valueMethod": ["pick-initial"]
1714
+ },
1715
+ {
1716
+ "type": ["boolean"]
1717
+ }
1718
+ ]
1719
+ },
1720
+ {
1721
+ "allOf": [
1722
+ {
1723
+ "__$valueMethod": ["pick-initial"]
1724
+ },
1725
+ {
1726
+ "/__$answerOptionMethods": ["snomed-value-set", "value-set"]
1727
+ }
1728
+ ]
1729
+ }
1730
+ ]
1644
1731
  },
1645
1732
  "widget": {
1646
1733
  "id": "table",
@@ -1664,9 +1751,347 @@
1664
1751
  {"field": "valueQuantity.value","title": "Value", "col": 4, "nolabel": true},
1665
1752
  {"field": "valueQuantity.unit", "title": "Unit", "col": 7, "nolabel": true},
1666
1753
  {"field": "valueReference", "noHeader": true, "nolabel": true}
1754
+ ],
1755
+ "showErrorTypeList": [
1756
+ { "type": "decimal", "properties": ["valueDecimal"], "codes": ["PATTERN"] },
1757
+ { "type": "integer", "properties": ["valueInteger"], "codes": ["PATTERN"] }
1667
1758
  ]
1668
1759
  }
1669
1760
  },
1761
+ "__$pickInitial": {
1762
+ "description": "One of the permitted answers for a \"choice\" or \"open-choice\" question.",
1763
+ "properties": {
1764
+ "repeats": {
1765
+ "description": "An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.",
1766
+ "title": "Allow repeating question?",
1767
+ "pattern": "^true|false$",
1768
+ "type": "boolean",
1769
+ "widget": {
1770
+ "id": "hidden"
1771
+ }
1772
+ },
1773
+ "selectedAnswers": {
1774
+ "type": "array",
1775
+ "title": "Pick Initial value",
1776
+ "items": {
1777
+ "properties": {
1778
+ "extension": {
1779
+ "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
1780
+ "items": {
1781
+ "$ref": "#/definitions/Extension"
1782
+ },
1783
+ "type": "array",
1784
+ "title": "Extension",
1785
+ "widget": {
1786
+ "id": "hidden"
1787
+ }
1788
+ },
1789
+ "valueCoding": {
1790
+ "description": "A potential answer that's allowed as the answer to this question.",
1791
+ "title": "Value coding",
1792
+ "properties": {
1793
+ "system": {
1794
+ "description": "The identification of the code system that defines the meaning of the symbol in the code.",
1795
+ "pattern": "^\\S*$",
1796
+ "type": "string"
1797
+ },
1798
+ "code": {
1799
+ "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
1800
+ "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
1801
+ "type": "string"
1802
+ },
1803
+ "display": {
1804
+ "description": "A representation of the meaning of the code in the system, following the rules of the system.",
1805
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1806
+ "type": "string"
1807
+ },
1808
+ "userSelected": {
1809
+ "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
1810
+ "pattern": "^true|false$",
1811
+ "type": "boolean"
1812
+ }
1813
+ },
1814
+ "additionalProperties": false,
1815
+ "type": "object",
1816
+ "visibleIf": {
1817
+ "/type": ["$EXP$ target.value == 'coding'"]
1818
+ }
1819
+ }
1820
+ },
1821
+ "additionalProperties": false,
1822
+ "type": "object"
1823
+ },
1824
+ }
1825
+ },
1826
+ "type": "object",
1827
+ "title": "Pick Initial value",
1828
+ "visibleIf": {
1829
+ "allOf": [
1830
+ {
1831
+ "__$valueMethod": ["pick-initial"]
1832
+ },
1833
+ {
1834
+ "/__$answerOptionMethods": ["$EXP$ target.value == 'answer-option'"]
1835
+ }
1836
+ ],
1837
+ },
1838
+ "widget": {
1839
+ "id": "pick-answer",
1840
+ "labelPosition": "left",
1841
+ "labelClasses": "col-2 ps-0 pe-1",
1842
+ "controlClasses": "col p-0",
1843
+ "addButtonLabel": "Add another value",
1844
+ "singleItemEnableSource": "repeats"
1845
+ }
1846
+ },
1847
+ "__$variable": {
1848
+ "description": "Use to store values derived from calculations, references to other answers, or external data.",
1849
+ "title": "Item Variables",
1850
+ "type": "array",
1851
+ "items": {
1852
+ "description": "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.",
1853
+ "properties": {
1854
+ "id": {
1855
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1856
+ "title": "Id",
1857
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1858
+ "type": "string",
1859
+ "widget": {"id": "hidden"}
1860
+ },
1861
+ "url": {
1862
+ "description": "A location where the data can be accessed.",
1863
+ "pattern": "^\\S*$",
1864
+ "type": "string"
1865
+ },
1866
+ "extension": {
1867
+ "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
1868
+ "items": {
1869
+ "$ref": "#/definitions/Extension"
1870
+ },
1871
+ "type": "array",
1872
+ "title": "Extension",
1873
+ "widget": {
1874
+ "id": "hidden"
1875
+ }
1876
+ },
1877
+ "valueString": {
1878
+ "description": "A potential answer that's allowed as the answer to this question.",
1879
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1880
+ "type": "string",
1881
+ "title": "Value string",
1882
+ "visibleIf": {
1883
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
1884
+ }
1885
+ },
1886
+ "valueExpression": {
1887
+ "description": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).",
1888
+ "properties": {
1889
+ "id": {
1890
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1891
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1892
+ "type": "string"
1893
+ },
1894
+ "description": {
1895
+ "description": "A brief, natural language description of the condition that effectively communicates the intended semantics.",
1896
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1897
+ "type": "string"
1898
+ },
1899
+ "name": {
1900
+ "description": "A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.",
1901
+ "pattern": "^[A-Za-z0-9\\-\\.]{1,64}$",
1902
+ "type": "string"
1903
+ },
1904
+ "language": {
1905
+ "description": "The media type of the language for the expression.",
1906
+ "enum": [
1907
+ "text/cql",
1908
+ "text/fhirpath",
1909
+ "application/x-fhir-query"
1910
+ ],
1911
+ "type": "string"
1912
+ },
1913
+ "expression": {
1914
+ "description": "An expression in the specified language that returns a value.",
1915
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1916
+ "type": "string"
1917
+ },
1918
+ "reference": {
1919
+ "description": "A URI that defines where the expression is found.",
1920
+ "pattern": "^\\S*$",
1921
+ "type": "string"
1922
+ },
1923
+ "extension": {
1924
+ "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
1925
+ "items": {
1926
+ "$ref": "#/definitions/Extension"
1927
+ },
1928
+ "type": "array",
1929
+ "widget": {
1930
+ "id": "hidden"
1931
+ }
1932
+ }
1933
+ },
1934
+ "additionalProperties": false,
1935
+ "type": "object"
1936
+ }
1937
+ },
1938
+ "additionalProperties": false,
1939
+ "type": "object"
1940
+ },
1941
+ "widget": {
1942
+ "id": "variable",
1943
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
1944
+ "showExpression": false,
1945
+ "displayExpressionEditorSections": {
1946
+ titleSection: true,
1947
+ uneditableVariablesSection: false,
1948
+ itemVariablesSection: true,
1949
+ outputExpressionSection: false
1950
+ },
1951
+ "labelPosition": "left",
1952
+ "labelClasses": "col-2 ps-0 pe-1",
1953
+ "controlClasses": "col-10 ",
1954
+ "addButtonLabel": "Add/edit variables",
1955
+ "showHeaderFields": [
1956
+ {"field": "valueExpression.properties.name", "nolabel": true, "col": 2, "title": "Name"},
1957
+ {"field": "valueExpression.properties.extension", "nolabel": true, "col": 3, "title": "Type"},
1958
+ {"field": "valueExpression.properties.expression", "nolabel": true, "col": 6, "title": "Question/FHIRPath Expression/FHIR Query"},
1959
+ ],
1960
+ "showDataFields": [
1961
+ {"field": "valueExpression.name", "nolabel": true, "col": 2, "title": "Name"},
1962
+ {"field": "valueExpression.extension", "nolabel": true, "col": 3, "tile": "Type"},
1963
+ {"field": "valueExpression.expression", "nolabel": true, "col": 6, "title": "Question/FHIRPath Expression/FHIR Query"}
1964
+ ]
1965
+ }
1966
+ },
1967
+ "__$initialExpression": {
1968
+ "description": "Initial expression.",
1969
+ "title": "Expression",
1970
+ "type": "object",
1971
+ "properties": {
1972
+ "id": {
1973
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1974
+ "title": "Id",
1975
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1976
+ "type": "string",
1977
+ "widget": {"id": "hidden"}
1978
+ },
1979
+ "url": {
1980
+ "description": "A location where the data can be accessed.",
1981
+ "pattern": "^\\S*$",
1982
+ "type": "string"
1983
+ },
1984
+ "extension": {
1985
+ "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
1986
+ "items": {
1987
+ "$ref": "#/definitions/Extension"
1988
+ },
1989
+ "type": "array",
1990
+ "title": "Extension",
1991
+ "widget": {
1992
+ "id": "hidden"
1993
+ }
1994
+ },
1995
+ "valueString": {
1996
+ "description": "A potential answer that's allowed as the answer to this question.",
1997
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1998
+ "type": "string",
1999
+ "title": "Value string",
2000
+ "visibleIf": {
2001
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
2002
+ }
2003
+ },
2004
+ "valueExpression": {
2005
+ "description": "The value of the Output parameter as a basic type.",
2006
+ "$ref": "#/definitions/Expression"
2007
+ }
2008
+ },
2009
+ "visibleIf": {
2010
+ "__$valueMethod": ["compute-initial"]
2011
+ },
2012
+ "widget": {
2013
+ "id": "expression-editor",
2014
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
2015
+ "userExpressionChoices": [
2016
+ { name: 'Computed continuously', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression' },
2017
+ { name: 'Only computed when the form loads', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression' }
2018
+ ],
2019
+ "showExpression": true,
2020
+ "displayExpressionEditorSections": {
2021
+ titleSection: true,
2022
+ uneditableVariablesSection: true,
2023
+ itemVariablesSection: true,
2024
+ outputExpressionSection: true
2025
+ },
2026
+ "labelPosition": "left",
2027
+ "labelClasses": "col-2 ps-0 pe-1",
2028
+ "controlClasses": "col form-control form-control-sm"
2029
+ }
2030
+ },
2031
+ "__$calculatedExpression": {
2032
+ "description": "Initial expression.",
2033
+ "title": "Expression",
2034
+ "type": "object",
2035
+ "properties": {
2036
+ "id": {
2037
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
2038
+ "title": "Id",
2039
+ "pattern": "^[ \\r\\n\\t\\S]+$",
2040
+ "type": "string",
2041
+ "widget": {"id": "hidden"}
2042
+ },
2043
+ "url": {
2044
+ "description": "A location where the data can be accessed.",
2045
+ "pattern": "^\\S*$",
2046
+ "type": "string"
2047
+ },
2048
+ "extension": {
2049
+ "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
2050
+ "items": {
2051
+ "$ref": "#/definitions/Extension"
2052
+ },
2053
+ "type": "array",
2054
+ "title": "Extension",
2055
+ "widget": {
2056
+ "id": "hidden"
2057
+ }
2058
+ },
2059
+ "valueString": {
2060
+ "description": "A potential answer that's allowed as the answer to this question.",
2061
+ "pattern": "^[ \\r\\n\\t\\S]+$",
2062
+ "type": "string",
2063
+ "title": "Value string",
2064
+ "visibleIf": {
2065
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
2066
+ }
2067
+ },
2068
+ "valueExpression": {
2069
+ "description": "The value of the Output parameter as a basic type.",
2070
+ "$ref": "#/definitions/Expression"
2071
+ }
2072
+ },
2073
+ "visibleIf": {
2074
+ "__$valueMethod": ["compute-continuously"]
2075
+ },
2076
+ "widget": {
2077
+ "id": "expression-editor",
2078
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
2079
+ "userExpressionChoices": [
2080
+ { name: 'Computed continuously', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression' },
2081
+ { name: 'Only computed when the form loads', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression' }
2082
+ ],
2083
+ "showExpression": true,
2084
+ "displayExpressionEditorSections": {
2085
+ titleSection: true,
2086
+ uneditableVariablesSection: true,
2087
+ itemVariablesSection: true,
2088
+ outputExpressionSection: true
2089
+ },
2090
+ "labelPosition": "left",
2091
+ "labelClasses": "col-2 ps-0 pe-1",
2092
+ "controlClasses": "col form-control form-control-sm"
2093
+ }
2094
+ },
1670
2095
  "__$observationLinkPeriod": {
1671
2096
  "description": "Sets a time window within which to look for an Observation with a matching code, for pre-population. Requires that a code be assigned to this item.",
1672
2097
  "title": "Add link to pre-populate FHIR Observation?",
@@ -2035,6 +2460,17 @@
2035
2460
  }
2036
2461
  ]
2037
2462
  },
2463
+ {
2464
+ "fields": [
2465
+ "__$valueMethod"
2466
+ ],
2467
+ "showFields": [
2468
+ {
2469
+ "field": "__$valueMethod",
2470
+ "col": 12
2471
+ }
2472
+ ]
2473
+ },
2038
2474
  {
2039
2475
  "fields": [
2040
2476
  "initial"
@@ -2046,6 +2482,50 @@
2046
2482
  }
2047
2483
  ]
2048
2484
  },
2485
+ {
2486
+ "fields": [
2487
+ "__$pickInitial"
2488
+ ],
2489
+ "showFields": [
2490
+ {
2491
+ "field": "__$pickInitial",
2492
+ "col": 12
2493
+ }
2494
+ ]
2495
+ },
2496
+ {
2497
+ "fields": [
2498
+ "__$variable"
2499
+ ],
2500
+ "showFields": [
2501
+ {
2502
+ "field": "__$variable",
2503
+ "col": 12
2504
+ }
2505
+ ]
2506
+ },
2507
+ {
2508
+ "fields": [
2509
+ "__$initialExpression"
2510
+ ],
2511
+ "showFields": [
2512
+ {
2513
+ "field": "__$initialExpression",
2514
+ "col": 12
2515
+ }
2516
+ ]
2517
+ },
2518
+ {
2519
+ "fields": [
2520
+ "__$calculatedExpression"
2521
+ ],
2522
+ "showFields": [
2523
+ {
2524
+ "field": "__$calculatedExpression",
2525
+ "col": 12
2526
+ }
2527
+ ]
2528
+ },
2049
2529
  {
2050
2530
  "fields": [
2051
2531
  "__$restrictions"
@@ -1 +1 @@
1
- {"version": "10.0.3"}
1
+ {"version": "10.0.5"}