[Immunization] How to calculate DUE dates for dependent Tasks | Code Changes #2140
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Implementation
How to identify the link between the questionnaire items and a Tasks
the
Task.reasonReference.reference
attribute.Task.status
after the Questionnaire is filled andthe
QuestionnaireResponse.status
marked ascompleted
.Task.status
attribute.Questionnaire.item.answerOption
on the first question asdescribed here.
Questionnaire.item.answerOption.valueCoding.id
as theTask.id
.Questionnaire.item.answerOption.valueCoding.display
as theTask.description
.Questionnaire.item.answerOption.valueCoding.code
as theTask.id
.how to generate the inputs for the update DUE dates function below.
QuestionnaireResponse.contained
attribute. Iterate through the
QuestionnaireResponse.contained
to get the Tasks then use the Tasks listto generate the input for the update DUE function below.
Task.id
from the resultingQuestionnaireResponse.item.answer
arrayand fetch the tasks related to the fetched ids from the local app database.
How to calculate DUE dates for dependent Tasks
Task.excecutionPeriod.start
attribute to account for the prerequisiteadministration date.
Task.partOf
attribute.Task.input.type
attribute defined withthe
{"coding":[{"system":"http://snomed.info/sct","code":"371154000","display":"Dependent (qualifier value)"}]}
.Task.input
attribute with the referencecode on the
Task.input.type
attribute.example
{"type":{"coding":[{"system":"http://snomed.info/sct","code":"900000000000457003","display":"Reference set attribute (foundation metadata concept)"}]},"reference":"Task/<string-uuid>"}
.Task.excutionPeriod.start
date will be calculated as followsadministration_date
. This can be found on the immunization resource here [Immunization] How to define the task timing | Content Changes #2142administration_date
from the dependent taskTask.excutionPeriod.start
to get the number of daysbetween the 2 dates.
date_interval
.date_interval
is=>
to the time interval (e.g. 28) defined on the dependenttask
Task.input.value
here.Task.input.value
tothe
administration_date
and update the dependent taskTask.excutionPeriod.start
to the results.Beta Was this translation helpful? Give feedback.
All reactions