formbuilder-lhcforms 10.0.2 → 10.0.4

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.
@@ -1084,7 +1084,11 @@
1084
1084
  "description": "Indicates whether the answer value is selected when the list of possible answers is initially shown.",
1085
1085
  "title": "Initial selected",
1086
1086
  "pattern": "^true|false$",
1087
- "type": "boolean"
1087
+ "type": "boolean",
1088
+ "visibleIf": {
1089
+ "/type": ["$EXP$ target.value == 'integer' || target.value == 'date' || target.value == 'time'|| target.value == 'string' || target.value == 'text' || target.value == 'coding'"]
1090
+ },
1091
+ "widget": {"id": "hidden"}
1088
1092
  }
1089
1093
  },
1090
1094
  "additionalProperties": false,
@@ -1093,7 +1097,14 @@
1093
1097
  "type": "array",
1094
1098
  "title": "Answer choices",
1095
1099
  "visibleIf": {
1096
- "__$answerOptionMethods": ["answer-option"]
1100
+ "allOf": [
1101
+ {
1102
+ "/__$answerOptionMethods": ["answer-option"]
1103
+ },
1104
+ {
1105
+ "__$valueMethod": ["$EXP$ target.value != 'compute-initial' && target.value != 'compute-continuously' "]
1106
+ }
1107
+ ]
1097
1108
  },
1098
1109
  "widget": {
1099
1110
  "id": "answer-option",
@@ -1282,7 +1293,47 @@
1282
1293
  "controlClasses": "col p-0"
1283
1294
  }
1284
1295
  },
1285
-
1296
+ "__$valueMethod": {
1297
+ "description": "Specify how the question obtains its initial values.",
1298
+ "title": "Value method",
1299
+ "visibleIf": {
1300
+ "/type": ["$EXP$ target.value != 'group' && target.value != 'display' "]
1301
+ },
1302
+ "oneOf": [
1303
+ {
1304
+ "type": "string",
1305
+ "enum": ["type-initial"],
1306
+ "title": "Type initial value"
1307
+ },
1308
+ {
1309
+ "type": "string",
1310
+ "enum": ["pick-initial"],
1311
+ "title": "Pick initial value"
1312
+ },
1313
+ {
1314
+ "type": "string",
1315
+ "enum": ["compute-initial"],
1316
+ "title": "Compute initial value"
1317
+ },
1318
+ {
1319
+ "type": "string",
1320
+ "enum": ["compute-continuously"],
1321
+ "title": "Continuously compute value"
1322
+ },
1323
+ {
1324
+ "type": "string",
1325
+ "enum": ["none"],
1326
+ "title": "None"
1327
+ }
1328
+ ],
1329
+ "type": "string",
1330
+ "widget": {
1331
+ "id": "value-method",
1332
+ "labelPosition": "left",
1333
+ "labelClasses": "col-2 ps-0 pe-1",
1334
+ "controlClasses": "col-auto btn-group btn-group-sm m-auto p-0"
1335
+ }
1336
+ },
1286
1337
  "initial": {
1287
1338
  "description": "One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.",
1288
1339
  "items": {
@@ -1338,6 +1389,9 @@
1338
1389
  "title": "Value decimal",
1339
1390
  "visibleIf": {
1340
1391
  "/type": ["decimal"]
1392
+ },
1393
+ "widget": {
1394
+ "id": "initial-number"
1341
1395
  }
1342
1396
  },
1343
1397
  "valueInteger": {
@@ -1347,6 +1401,9 @@
1347
1401
  "title": "Value integer",
1348
1402
  "visibleIf": {
1349
1403
  "/type": ["integer"]
1404
+ },
1405
+ "widget": {
1406
+ "id": "initial-number"
1350
1407
  }
1351
1408
  },
1352
1409
  "valueDate": {
@@ -1640,7 +1697,21 @@
1640
1697
  "type": "array",
1641
1698
  "title": "Initial value",
1642
1699
  "visibleIf": {
1643
- "/type": ["$EXP$ target.value != 'group' && target.value != 'display' && target.value != 'coding'"]
1700
+ "oneOf": [
1701
+ {
1702
+ "__$valueMethod": ["type-initial"]
1703
+ },
1704
+ {
1705
+ "allOf": [
1706
+ {
1707
+ "__$valueMethod": ["pick-initial"]
1708
+ },
1709
+ {
1710
+ "type": ["boolean"]
1711
+ }
1712
+ ]
1713
+ }
1714
+ ]
1644
1715
  },
1645
1716
  "widget": {
1646
1717
  "id": "table",
@@ -1664,9 +1735,347 @@
1664
1735
  {"field": "valueQuantity.value","title": "Value", "col": 4, "nolabel": true},
1665
1736
  {"field": "valueQuantity.unit", "title": "Unit", "col": 7, "nolabel": true},
1666
1737
  {"field": "valueReference", "noHeader": true, "nolabel": true}
1738
+ ],
1739
+ "showErrorTypeList": [
1740
+ { "type": "decimal", "properties": ["valueDecimal"], "codes": ["PATTERN"] },
1741
+ { "type": "integer", "properties": ["valueInteger"], "codes": ["PATTERN"] }
1742
+ ]
1743
+ }
1744
+ },
1745
+ "__$pickInitial": {
1746
+ "description": "One of the permitted answers for a \"choice\" or \"open-choice\" question.",
1747
+ "properties": {
1748
+ "repeats": {
1749
+ "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.",
1750
+ "title": "Allow repeating question?",
1751
+ "pattern": "^true|false$",
1752
+ "type": "boolean",
1753
+ "widget": {
1754
+ "id": "hidden"
1755
+ }
1756
+ },
1757
+ "selectedAnswers": {
1758
+ "type": "array",
1759
+ "title": "Pick Initial value",
1760
+ "items": {
1761
+ "properties": {
1762
+ "extension": {
1763
+ "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.",
1764
+ "items": {
1765
+ "$ref": "#/definitions/Extension"
1766
+ },
1767
+ "type": "array",
1768
+ "title": "Extension",
1769
+ "widget": {
1770
+ "id": "hidden"
1771
+ }
1772
+ },
1773
+ "valueCoding": {
1774
+ "description": "A potential answer that's allowed as the answer to this question.",
1775
+ "title": "Value coding",
1776
+ "properties": {
1777
+ "system": {
1778
+ "description": "The identification of the code system that defines the meaning of the symbol in the code.",
1779
+ "pattern": "^\\S*$",
1780
+ "type": "string"
1781
+ },
1782
+ "code": {
1783
+ "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).",
1784
+ "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
1785
+ "type": "string"
1786
+ },
1787
+ "display": {
1788
+ "description": "A representation of the meaning of the code in the system, following the rules of the system.",
1789
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1790
+ "type": "string"
1791
+ },
1792
+ "userSelected": {
1793
+ "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
1794
+ "pattern": "^true|false$",
1795
+ "type": "boolean"
1796
+ }
1797
+ },
1798
+ "additionalProperties": false,
1799
+ "type": "object",
1800
+ "visibleIf": {
1801
+ "/type": ["$EXP$ target.value == 'choice' || target.value == 'open-choice'"]
1802
+ }
1803
+ }
1804
+ },
1805
+ "additionalProperties": false,
1806
+ "type": "object"
1807
+ },
1808
+ }
1809
+ },
1810
+ "type": "object",
1811
+ "title": "Pick Initial value",
1812
+ "visibleIf": {
1813
+ "allOf": [
1814
+ {
1815
+ "__$valueMethod": ["pick-initial"]
1816
+ },
1817
+ {
1818
+ "/__$answerOptionMethods": ["$EXP$ target.value == 'answer-option'"]
1819
+ }
1820
+ ],
1821
+ },
1822
+ "widget": {
1823
+ "id": "pick-answer",
1824
+ "labelPosition": "left",
1825
+ "labelClasses": "col-2 ps-0 pe-1",
1826
+ "controlClasses": "col p-0",
1827
+ "addButtonLabel": "Add another value",
1828
+ "singleItemEnableSource": "repeats"
1829
+ }
1830
+ },
1831
+ "__$variable": {
1832
+ "description": "Use to store values derived from calculations, references to other answers, or external data.",
1833
+ "title": "Item Variables",
1834
+ "type": "array",
1835
+ "items": {
1836
+ "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.",
1837
+ "properties": {
1838
+ "id": {
1839
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1840
+ "title": "Id",
1841
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1842
+ "type": "string",
1843
+ "widget": {"id": "hidden"}
1844
+ },
1845
+ "url": {
1846
+ "description": "A location where the data can be accessed.",
1847
+ "pattern": "^\\S*$",
1848
+ "type": "string"
1849
+ },
1850
+ "extension": {
1851
+ "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.",
1852
+ "items": {
1853
+ "$ref": "#/definitions/Extension"
1854
+ },
1855
+ "type": "array",
1856
+ "title": "Extension",
1857
+ "widget": {
1858
+ "id": "hidden"
1859
+ }
1860
+ },
1861
+ "valueString": {
1862
+ "description": "A potential answer that's allowed as the answer to this question.",
1863
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1864
+ "type": "string",
1865
+ "title": "Value string",
1866
+ "visibleIf": {
1867
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
1868
+ }
1869
+ },
1870
+ "valueExpression": {
1871
+ "description": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).",
1872
+ "properties": {
1873
+ "id": {
1874
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1875
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1876
+ "type": "string"
1877
+ },
1878
+ "description": {
1879
+ "description": "A brief, natural language description of the condition that effectively communicates the intended semantics.",
1880
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1881
+ "type": "string"
1882
+ },
1883
+ "name": {
1884
+ "description": "A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.",
1885
+ "pattern": "^[A-Za-z0-9\\-\\.]{1,64}$",
1886
+ "type": "string"
1887
+ },
1888
+ "language": {
1889
+ "description": "The media type of the language for the expression.",
1890
+ "enum": [
1891
+ "text/cql",
1892
+ "text/fhirpath",
1893
+ "application/x-fhir-query"
1894
+ ],
1895
+ "type": "string"
1896
+ },
1897
+ "expression": {
1898
+ "description": "An expression in the specified language that returns a value.",
1899
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1900
+ "type": "string"
1901
+ },
1902
+ "reference": {
1903
+ "description": "A URI that defines where the expression is found.",
1904
+ "pattern": "^\\S*$",
1905
+ "type": "string"
1906
+ },
1907
+ "extension": {
1908
+ "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.",
1909
+ "items": {
1910
+ "$ref": "#/definitions/Extension"
1911
+ },
1912
+ "type": "array",
1913
+ "widget": {
1914
+ "id": "hidden"
1915
+ }
1916
+ }
1917
+ },
1918
+ "additionalProperties": false,
1919
+ "type": "object"
1920
+ }
1921
+ },
1922
+ "additionalProperties": false,
1923
+ "type": "object"
1924
+ },
1925
+ "widget": {
1926
+ "id": "variable",
1927
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
1928
+ "showExpression": false,
1929
+ "displayExpressionEditorSections": {
1930
+ titleSection: true,
1931
+ uneditableVariablesSection: false,
1932
+ itemVariablesSection: true,
1933
+ outputExpressionSection: false
1934
+ },
1935
+ "labelPosition": "left",
1936
+ "labelClasses": "col-2 ps-0 pe-1",
1937
+ "controlClasses": "col-10 ",
1938
+ "addButtonLabel": "Add/edit variables",
1939
+ "showHeaderFields": [
1940
+ {"field": "valueExpression.properties.name", "nolabel": true, "col": 2, "title": "Name"},
1941
+ {"field": "valueExpression.properties.extension", "nolabel": true, "col": 3, "title": "Type"},
1942
+ {"field": "valueExpression.properties.expression", "nolabel": true, "col": 6, "title": "Question/FHIRPath Expression/FHIR Query"},
1943
+ ],
1944
+ "showDataFields": [
1945
+ {"field": "valueExpression.name", "nolabel": true, "col": 2, "title": "Name"},
1946
+ {"field": "valueExpression.extension", "nolabel": true, "col": 3, "tile": "Type"},
1947
+ {"field": "valueExpression.expression", "nolabel": true, "col": 6, "title": "Question/FHIRPath Expression/FHIR Query"}
1667
1948
  ]
1668
1949
  }
1669
1950
  },
1951
+ "__$initialExpression": {
1952
+ "description": "Initial expression.",
1953
+ "title": "Expression",
1954
+ "type": "object",
1955
+ "properties": {
1956
+ "id": {
1957
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
1958
+ "title": "Id",
1959
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1960
+ "type": "string",
1961
+ "widget": {"id": "hidden"}
1962
+ },
1963
+ "url": {
1964
+ "description": "A location where the data can be accessed.",
1965
+ "pattern": "^\\S*$",
1966
+ "type": "string"
1967
+ },
1968
+ "extension": {
1969
+ "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.",
1970
+ "items": {
1971
+ "$ref": "#/definitions/Extension"
1972
+ },
1973
+ "type": "array",
1974
+ "title": "Extension",
1975
+ "widget": {
1976
+ "id": "hidden"
1977
+ }
1978
+ },
1979
+ "valueString": {
1980
+ "description": "A potential answer that's allowed as the answer to this question.",
1981
+ "pattern": "^[ \\r\\n\\t\\S]+$",
1982
+ "type": "string",
1983
+ "title": "Value string",
1984
+ "visibleIf": {
1985
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
1986
+ }
1987
+ },
1988
+ "valueExpression": {
1989
+ "description": "The value of the Output parameter as a basic type.",
1990
+ "$ref": "#/definitions/Expression"
1991
+ }
1992
+ },
1993
+ "visibleIf": {
1994
+ "__$valueMethod": ["compute-initial"]
1995
+ },
1996
+ "widget": {
1997
+ "id": "expression-editor",
1998
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
1999
+ "userExpressionChoices": [
2000
+ { name: 'Computed continuously', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression' },
2001
+ { name: 'Only computed when the form loads', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression' }
2002
+ ],
2003
+ "showExpression": true,
2004
+ "displayExpressionEditorSections": {
2005
+ titleSection: true,
2006
+ uneditableVariablesSection: true,
2007
+ itemVariablesSection: true,
2008
+ outputExpressionSection: true
2009
+ },
2010
+ "labelPosition": "left",
2011
+ "labelClasses": "col-2 ps-0 pe-1",
2012
+ "controlClasses": "col form-control form-control-sm"
2013
+ }
2014
+ },
2015
+ "__$calculatedExpression": {
2016
+ "description": "Initial expression.",
2017
+ "title": "Expression",
2018
+ "type": "object",
2019
+ "properties": {
2020
+ "id": {
2021
+ "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
2022
+ "title": "Id",
2023
+ "pattern": "^[ \\r\\n\\t\\S]+$",
2024
+ "type": "string",
2025
+ "widget": {"id": "hidden"}
2026
+ },
2027
+ "url": {
2028
+ "description": "A location where the data can be accessed.",
2029
+ "pattern": "^\\S*$",
2030
+ "type": "string"
2031
+ },
2032
+ "extension": {
2033
+ "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.",
2034
+ "items": {
2035
+ "$ref": "#/definitions/Extension"
2036
+ },
2037
+ "type": "array",
2038
+ "title": "Extension",
2039
+ "widget": {
2040
+ "id": "hidden"
2041
+ }
2042
+ },
2043
+ "valueString": {
2044
+ "description": "A potential answer that's allowed as the answer to this question.",
2045
+ "pattern": "^[ \\r\\n\\t\\S]+$",
2046
+ "type": "string",
2047
+ "title": "Value string",
2048
+ "visibleIf": {
2049
+ "/type": ["$EXP$ target.value == 'string' || target.value == 'text'"]
2050
+ }
2051
+ },
2052
+ "valueExpression": {
2053
+ "description": "The value of the Output parameter as a basic type.",
2054
+ "$ref": "#/definitions/Expression"
2055
+ }
2056
+ },
2057
+ "visibleIf": {
2058
+ "__$valueMethod": ["compute-continuously"]
2059
+ },
2060
+ "widget": {
2061
+ "id": "expression-editor",
2062
+ "expressionUri": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
2063
+ "userExpressionChoices": [
2064
+ { name: 'Computed continuously', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression' },
2065
+ { name: 'Only computed when the form loads', uri: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression' }
2066
+ ],
2067
+ "showExpression": true,
2068
+ "displayExpressionEditorSections": {
2069
+ titleSection: true,
2070
+ uneditableVariablesSection: true,
2071
+ itemVariablesSection: true,
2072
+ outputExpressionSection: true
2073
+ },
2074
+ "labelPosition": "left",
2075
+ "labelClasses": "col-2 ps-0 pe-1",
2076
+ "controlClasses": "col form-control form-control-sm"
2077
+ }
2078
+ },
1670
2079
  "__$observationLinkPeriod": {
1671
2080
  "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
2081
  "title": "Add link to pre-populate FHIR Observation?",
@@ -2035,6 +2444,17 @@
2035
2444
  }
2036
2445
  ]
2037
2446
  },
2447
+ {
2448
+ "fields": [
2449
+ "__$valueMethod"
2450
+ ],
2451
+ "showFields": [
2452
+ {
2453
+ "field": "__$valueMethod",
2454
+ "col": 12
2455
+ }
2456
+ ]
2457
+ },
2038
2458
  {
2039
2459
  "fields": [
2040
2460
  "initial"
@@ -2046,6 +2466,50 @@
2046
2466
  }
2047
2467
  ]
2048
2468
  },
2469
+ {
2470
+ "fields": [
2471
+ "__$pickInitial"
2472
+ ],
2473
+ "showFields": [
2474
+ {
2475
+ "field": "__$pickInitial",
2476
+ "col": 12
2477
+ }
2478
+ ]
2479
+ },
2480
+ {
2481
+ "fields": [
2482
+ "__$variable"
2483
+ ],
2484
+ "showFields": [
2485
+ {
2486
+ "field": "__$variable",
2487
+ "col": 12
2488
+ }
2489
+ ]
2490
+ },
2491
+ {
2492
+ "fields": [
2493
+ "__$initialExpression"
2494
+ ],
2495
+ "showFields": [
2496
+ {
2497
+ "field": "__$initialExpression",
2498
+ "col": 12
2499
+ }
2500
+ ]
2501
+ },
2502
+ {
2503
+ "fields": [
2504
+ "__$calculatedExpression"
2505
+ ],
2506
+ "showFields": [
2507
+ {
2508
+ "field": "__$calculatedExpression",
2509
+ "col": 12
2510
+ }
2511
+ ]
2512
+ },
2049
2513
  {
2050
2514
  "fields": [
2051
2515
  "__$restrictions"
@@ -1 +1 @@
1
- {"version": "10.0.2"}
1
+ {"version": "10.0.4"}