Closed Rkareko closed 3 months ago
Sample of the updated values
{
"jsonPathExpression": "Task.status",
"value": "cancelled",
"resourceType": "Task"
},
{
"jsonPathExpression": "CarePlan.status",
"value": "completed",
"resourceType": "CarePlan"
},
{
"jsonPathExpression": "ServiceRequest.status",
"value": "revoked",
"resourceType": "ServiceRequest"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].code",
"value": "370996005",
"resourceType": "Condition"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].system",
"value": "http://www.snomed.org/",
"resourceType": "Condition"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].display",
"value": "resolved",
"resourceType": "Condition"
}
],
"resourceFilterExpressions": [
{
"conditionalFhirPathExpressions": [
"Task.status != 'completed'"
],
"resourceType": "Task"
},
{
"conditionalFhirPathExpressions": [
"ServiceRequest.status != 'completed'"
],
"resourceType": "ServiceRequest"
}
Here is a sample of a complete eventWorkFlow
config
{"eventWorkflows": [
{
"eventType": "RESOURCE_CLOSURE",
"triggerConditions": [
{
"eventResourceId": "carePlanToBeClosed",
"conditionalFhirPathExpressions": [
"true"
]
},
{
"eventResourceId": "referralServiceRequestToBeClosed",
"conditionalFhirPathExpressions": [
"%resource.entry.where(resource is QuestionnaireResponse).resource.where(questionnaire = 'Questionnaire/dc-remove-patient').exists() and %resource.entry.where(resource is QuestionnaireResponse).resource.repeat(item).where(linkId = 'reason-for-removal' and (answer.value.code = 'died' or answer.value.code = 'moved-away')).exists()"
]
}
],
"eventResources": [
{
"id": "carePlanToBeClosed",
"resource": "CarePlan",
"configRules": [
{
"name": "patientId",
"condition": "true",
"actions": [
"data.put('patientId', fhirPath.extractValue(Patient, 'Patient.id').contains('Patient') ? fhirPath.extractValue(Patient, 'Patient.id') : 'Patient/' + fhirPath.extractValue(Patient, 'Patient.id'))"
]
}
],
"dataQueries": [
{
"paramName": "instantiates-canonical",
"filterCriteria": [
{
"dataType": "REFERENCE",
"value": "PlanDefinition/dc-diabetes-screening-intervention"
}
]
},
{
"paramName": "subject",
"filterCriteria": [
{
"dataType": "REFERENCE",
"computedRule": "patientId"
}
]
}
],
"relatedResources": [
{
"resource": "Task",
"searchParameter": "based-on"
}
]
},
{
"id": "referralServiceRequestToBeClosed",
"resource": "ServiceRequest",
"configRules": [
{
"name": "patientId",
"condition": "true",
"actions": [
"data.put('patientId', fhirPath.extractValue(Patient, 'Patient.id'))"
]
}
],
"dataQueries": [
{
"paramName": "code",
"filterCriteria": [
{
"dataType": "CODEABLECONCEPT",
"value": {
"system": "http://snomed.info/sct",
"code": "44383000"
}
}
]
},
{
"paramName": "subject",
"filterCriteria": [
{
"dataType": "REFERENCE",
"computedRule": "patientId"
}
]
}
]
}
],
"updateValues": [
{
"jsonPathExpression": "Task.status",
"value": "cancelled",
"resourceType": "Task"
},
{
"jsonPathExpression": "CarePlan.status",
"value": "completed",
"resourceType": "CarePlan"
},
{
"jsonPathExpression": "ServiceRequest.status",
"value": "revoked",
"resourceType": "ServiceRequest"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].code",
"value": "370996005",
"resourceType": "Condition"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].system",
"value": "http://www.snomed.org/",
"resourceType": "Condition"
},
{
"jsonPathExpression": "Condition.clinicalStatus.coding[0].display",
"value": "resolved",
"resourceType": "Condition"
}
],
"resourceFilterExpressions": [
{
"conditionalFhirPathExpressions": [
"Task.status != 'completed'"
],
"resourceType": "Task"
},
{
"conditionalFhirPathExpressions": [
"ServiceRequest.status != 'completed'"
],
"resourceType": "ServiceRequest"
}
]
}
]
}
Attention: Patch coverage is 77.14286%
with 8 lines
in your changes are missing coverage. Please review.
Project coverage is 29.8%. Comparing base (
ac82739
) to head (8e28d73
). Report is 7 commits behind head on main.
App crashes when loading Profile screen. Do not merge till this is fixed.
App crashes when loading Profile screen. Do not merge till this is fixed.
@Rkareko This could be related to the updated configs. The existing configs need to be updated for the rest of the apps using this feature.
Update the docs, then we can have this merged.
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #3149
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file