-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of targetConstraint extension #1066
Comments
Resolved as of v1.0.0-alpha.22! Try it out at https://alpha.smartforms.io/playground If the target contraint's FHIRPath expression is evaluated as true, the renderer's internal TargetConstraint's state will have If the value is invalid (aka Now, if you add a Feel free to close the issue if if looks ok on your end. Advanced properties in case you are interested:
QuestionnaireStore TargetConstraints:
QuestionnaireResponseStore InvalidItems:
|
That's awesome. Thank you so much for this Sean, I will get to experimenting with this. |
Hi Sean, |
Is your feature request related to a problem? Please describe.
In our Questionnaire we are collecting blood pressure values. We would like a typo checking mechanism to have the ability for the Questionnaire to give a warning prompt when the value of systolic is less than the value for diastolic.
Describe the solution you'd like
The use of the extension: https://www.hl7.org/fhir/extensions/5.1.0/StructureDefinition-targetConstraint.html looks like it would be a good fit. As it states a context of use:
Element ID Questionnaire
Element ID Questionnaire.item
Describe alternatives you've considered
N/A as yet- preference for targetConstraint
Additional context
The below is the example that I have tried in the playground renderer:
{
"resourceType": "Questionnaire",
"id": "example-questionnaire",
"status": "active",
"subjectType": ["Patient"],
"item": [
{
"linkId": "1.1",
"text": "Systolic Blood Pressure",
"type": "integer"
},
{
"linkId": "1.2",
"text": "Diastolic Blood Pressure",
"type": "integer"
}
],
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/targetConstraint",
"extension": [
{
"url": "key",
"valueId": "bp-constraint"
},
{
"url": "severity",
"valueCode": "warning"
},
{
"url": "expression",
"valueExpression": {
"language": "text/fhirpath",
"expression": "%resource.item.where(linkId='1.1').answer.value < %resource.item.where(linkId='1.2').answer.value"
}
},
{
"url": "human",
"valueString": "Systolic blood pressure should not be less than diastolic blood pressure."
}
]
}
]
}
The text was updated successfully, but these errors were encountered: