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

U4X-799: Switch implementation of current regimen line from workflows to obs backed up by concepts #671

Conversation

Daphne210
Copy link
Collaborator

@Daphne210 Daphne210 requested a review from Mwanje November 13, 2024 19:53
@Daphne210 Daphne210 self-assigned this Nov 13, 2024
…ugandaemr into U4X-799-switch-implementation-of-current-regimen-line-from-workflows-to-obs-backed-up-by-concepts
Copy link
Collaborator

@slubwama slubwama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use uuid for 166039 (107bef04-bf05-4f41-9260-b167c1108f7e) Current regimen and uuid of 90315 (dd2b0b4d-30ab-102d-86b0-7a5022ba4115) in the calculated expression

https://github.com/mohuganda/openmrs-module-ugandaemr/blob/02e809f21f1d990ba2ede2849a323c55c0a9a68a/omod/src/main/webapp/resources/jsonforms/003-HMIS_ACP_ARTCard_RegimenChange.json#L44C82-L44C117

"calculate": {
"calculateExpression": "resolve(api.getLatestObs(patient.id, 'e6a72c98-1c79-4e76-84b1-2db63d27bce6'))?.valueCodeableConcept?.coding[0]?.code"
"calculateExpression": "resolve(api.getLatestObs(patient.id, '80148344-ce80-42f7-9d4a-8c1935efe76e')).then(obs => obs.valueCodeableConcept?.coding[0]?.code)"
Copy link
Collaborator

@slubwama slubwama Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the uuid for concept 164515 (164515AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) instead of 164350 in the calculated expression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been adjusted, and what happens to the New Regimen Line which is using the same concept uuid as shown below:

"label": "New Regimen Line", "type": "obs", "id": "newRegimenLine", "readonly": true, "questionOptions": { "concept": "164515AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "rendering": "select", "calculate": { "calculateExpression": "resolve(api.getLatestObs(patient.id, '164515AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')).then(obs => obs.valueCodeableConcept?.coding[0]?.code)" }

@Daphne210
Copy link
Collaborator Author

use uuid for 166039 (107bef04-bf05-4f41-9260-b167c1108f7e) Current regimen and uuid of 90315 (dd2b0b4d-30ab-102d-86b0-7a5022ba4115) in the calculated expression

https://github.com/mohuganda/openmrs-module-ugandaemr/blob/02e809f21f1d990ba2ede2849a323c55c0a9a68a/omod/src/main/webapp/resources/jsonforms/003-HMIS_ACP_ARTCard_RegimenChange.json#L44C82-L44C117

This has been adjusted for the current regimen

@slubwama slubwama merged commit 2b44f4c into mohuganda:master Nov 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants