Skip to content

Commit

Permalink
Updates follow-up and closure form calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
pirupius committed Dec 4, 2024
1 parent 78247a0 commit 2f5b355
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@
"rendering": "select",
"concept": "19dffa49-65bb-4d21-b71e-ea46e599a20d",
"calculate": {
"calculateExpression": "getLatestOpenmrsObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -1551,7 +1551,7 @@
"rendering": "select",
"concept": "3269eeab-5ce2-45d9-95be-70e9e73712c8",
"calculate": {
"calculateExpression": "getLatestOpenmrsObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
"rendering": "select",
"concept": "19dffa49-65bb-4d21-b71e-ea46e599a20d",
"calculate": {
"calculateExpression": "getLatestOpenmrsObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -720,7 +720,7 @@
"rendering": "select",
"concept": "3269eeab-5ce2-45d9-95be-70e9e73712c8",
"calculate": {
"calculateExpression": "getLatestOpenmrsObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"rendering": "select",
"concept": "77f1a782-24af-40ba-bac1-b97d9a080f40",
"calculate": {
"calculateExpression": "api.getLatestOpenmrsObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -328,7 +328,7 @@
"rendering": "select",
"concept": "19dffa49-65bb-4d21-b71e-ea46e599a20d",
"calculate": {
"calculateExpression": "api.getLatestOpenmrsObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -363,4 +363,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
"min": "0",
"max": "65",
"calculate": {
"calculateExpression": "api.getLatestObs(patient.id, 'b2c5b6e0-66f0-4b9d-8576-b6f48e0a06df').then(value => value)"
"calculateExpression": "api.getLatestObs(patient.id, 'b2c5b6e0-66f0-4b9d-8576-b6f48e0a06df').then(obs => obs?.valueQuantity?.value)"
}
},
"default": "Value of last MHOS score measured"
Expand All @@ -277,7 +277,7 @@
"min": "0",
"max": "27",
"calculate": {
"calculateExpression": "api.getLatestObs(patient.id, '5f3d618e-5c89-43bd-8c79-07e4e98c2f23').then(value => value)"
"calculateExpression": "api.getLatestObs(patient.id, '5f3d618e-5c89-43bd-8c79-07e4e98c2f23').then(obs => obs?.valueQuantity?.value)"
}
},
"default": "Value of last PHQ-9 score measured"
Expand All @@ -291,7 +291,7 @@
"rendering": "select",
"concept": "77f1a782-24af-40ba-bac1-b97d9a080f40",
"calculate": {
"calculateExpression": "api.getLatestOpenmrsObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'a1a75011-0fef-460a-b666-dda2d171f39b').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -330,7 +330,7 @@
"rendering": "select",
"concept": "19dffa49-65bb-4d21-b71e-ea46e599a20d",
"calculate": {
"calculateExpression": "api.getLatestOpenmrsObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs)"
"calculateExpression": "api.getLatestObs(patient.id, 'f94de17e-9771-4711-aabb-c5bb0c022be2').then(obs => obs?.valueCodeableConcept?.coding[0]?.code)"
},
"answers": [
{
Expand Down Expand Up @@ -365,4 +365,4 @@
]
}
]
}
}

0 comments on commit 2f5b355

Please sign in to comment.