Skip to content
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

Open
samturneradha opened this issue Nov 27, 2024 · 0 comments
Open

Implementation of targetConstraint extension #1066

samturneradha opened this issue Nov 27, 2024 · 0 comments

Comments

@samturneradha
Copy link

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."
}
]
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant