Skip to content

Commit

Permalink
WIP Prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
FikriMilano committed Sep 26, 2023
1 parent 49ec45c commit 459317c
Show file tree
Hide file tree
Showing 13 changed files with 338 additions and 280 deletions.
163 changes: 27 additions & 136 deletions catalog/src/main/assets/component_text_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,153 +3,44 @@
"item": [
{
"linkId": "1",
"type": "string",
"item": [
{
"linkId": "1.1",
"text": "Enter a string",
"type": "display",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
"text": "Password",
"type": "string"
},
{
"linkId": "2",
"type": "integer",
"item": [
"extension": [
{
"linkId": "2.1",
"text": "Enter an integer",
"type": "display",
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-constraint",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "3",
"type": "decimal",
"item": [
{
"linkId": "3.1",
"text": "Enter a decimal",
"type": "display",
"extension": [
"url": "key",
"valueId": "constraint-1"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "4",
"type": "integer",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
"valueCoding": {
"system": "http://unitsofmeasure.org",
"code": "kg",
"display": "kilogram"
}
}
],
"item": [
{
"linkId": "4.1",
"text": "Enter an integer (with unit)",
"type": "display",
"extension": [
"url": "requirements",
"valueString": "Confirm password field must have the same value as password field"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "5",
"type": "decimal",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
"valueCoding": {
"system": "http://unitsofmeasure.org",
"code": "kg",
"display": "kilogram"
}
}
],
"item": [
{
"linkId": "5.1",
"text": "Enter a decimal (with unit)",
"type": "display",
"extension": [
"url": "severity",
"valueCode": "error"
},
{
"url": "expression",
"valueString": "%resource.descendants().where(linkId='1').answer.value = %resource.descendants().where(linkId='2').answer.value"
},
{
"url": "human",
"valueString": "Password does not match"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
"url": "location",
"valueString": "1"
}
]
}
]
],
"linkId": "2",
"text": "Confirm password",
"type": "string"
}
]
}
168 changes: 27 additions & 141 deletions catalog/src/main/assets/component_text_fields_with_validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,158 +3,44 @@
"item": [
{
"linkId": "1",
"type": "string",
"required": true,
"item": [
{
"linkId": "1.1",
"text": "Enter a string",
"type": "display",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
"text": "Password",
"type": "string"
},
{
"linkId": "2",
"type": "integer",
"required": true,
"item": [
"extension": [
{
"linkId": "2.1",
"text": "Enter an integer",
"type": "display",
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-constraint",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "3",
"type": "decimal",
"required": true,
"item": [
{
"linkId": "3.1",
"text": "Enter a decimal",
"type": "display",
"extension": [
"url": "key",
"valueId": "constraint-1"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "4",
"type": "integer",
"required": true,
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
"valueCoding": {
"system": "http://unitsofmeasure.org",
"code": "kg",
"display": "kilogram"
}
}
],
"item": [
{
"linkId": "4.1",
"text": "Enter an integer (with unit)",
"type": "display",
"extension": [
"url": "requirements",
"valueString": "Confirm password field must have the same value as password field"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
}
]
}
]
},
{
"linkId": "5",
"type": "decimal",
"required": true,
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
"valueCoding": {
"system": "http://unitsofmeasure.org",
"code": "kg",
"display": "kilogram"
}
}
],
"item": [
{
"linkId": "5.1",
"text": "Enter a decimal (with unit)",
"type": "display",
"extension": [
"url": "severity",
"valueCode": "error"
},
{
"url": "expression",
"valueString": "%resource.descendants().where(linkId='1').answer.value = %resource.descendants().where(linkId='2').answer.value"
},
{
"url": "human",
"valueString": "Password does not match"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "flyover",
"display": "Fly-over"
}
],
"text": "Flyover"
}
"url": "location",
"valueString": "1"
}
]
}
]
],
"linkId": "2",
"text": "Confirm password",
"type": "string"
}
]
}
Loading

0 comments on commit 459317c

Please sign in to comment.