sdc-ide
sdc-ide copied to clipboard
enableWhen doesn't work
enableWhen expression fo question with linkId immunizationDetails.sideEffect doesn't work
subjectType:
- Patient
meta:
profile:
- https://beda.software/beda-emr-questionnaire
lastUpdated: '2023-11-07T05:29:45.958983Z'
versionId: '6172'
extension:
- url: ex:createdAt
valueInstant: '2023-11-07T05:29:45.958983Z'
name: immunization-test
item:
- item:
- text: Type of Vaccine
type: choice
linkId: immunizationDetails.vaccineType
answerValueSet: http://hl7.org/fhir/ValueSet/vaccine-code
- text: Date of Vaccination
type: date
linkId: immunizationDetails.vaccinationDate
- text: Lot Number
type: string
linkId: immunizationDetails.lotNumber
- text: Administered By
type: string
linkId: immunizationDetails.administeredBy
- text: Manufacturer
type: string
linkId: immunizationDetails.manufacturer
- text: Are there any side effects?
type: boolean
linkId: immunizationDetails.sideEffectsPresent
- text: Choose side effect
type: choice
linkId: immunizationDetails.sideEffect
enableWhen:
- answerBoolean: true
operator: '='
question: immunizationDetails.sideEffectsPresent
answerOption:
- valueCoding:
code: '438840001'
system: http://snomed.info/sct
display: Injection site erythema
- valueCoding:
code: '13995003'
system: http://snomed.info/sct
display: Injection site swelling
- valueCoding:
code: '28926001'
system: http://snomed.info/sct
display: Injection site pain
- valueCoding:
code: '24199005'
system: http://snomed.info/sct
display: Injection site pruritus
- valueCoding:
code: '16932000'
system: http://snomed.info/sct
display: Fatigue
- valueCoding:
code: '422587007'
system: http://snomed.info/sct
display: Fever
- valueCoding:
code: '267036007'
system: http://snomed.info/sct
display: Headache
- valueCoding:
code: '162397003'
system: http://snomed.info/sct
display: Muscle pain
- valueCoding:
code: '271807003'
system: http://snomed.info/sct
display: Chills
- valueCoding:
code: '49727002'
system: http://snomed.info/sct
display: Nausea
text: Immunization Details
type: group
linkId: immunizationDetails
- text: PatientId
type: string
extension:
- url: http://hl7.org/fhir/StructureDefinition/questionnaire-hidden
valueBoolean: true
- url: >-
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression
valueExpression:
language: text/fhirpath
expression: '%Patient.id'
linkId: patientId
resourceType: Questionnaire
title: Immunization test
extension:
- url: >-
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext
extension:
- url: name
valueCoding:
code: Patient
- url: type
valueCode: Patient
status: draft
If linkId contains a dot it causes a rerender of a form in SDC-ide.
This problem is related to the linkId. For the react-final-form we should use the dot split path.
https://final-form.org/docs/final-form/field-names