-
Notifications
You must be signed in to change notification settings - Fork 249
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
feat:(form-app) mostRecentObsValueBefore data source in form-entry (O3-1661) #903
Conversation
Size Change: +514 B (0%) Total Size: 5.72 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Hadijah! Some good stuff in here. I think you're right that we need the patient UUID as a parameter, so the function signature should be something like:
getMostRecentObsValues(patient: string, concepts: string[])
But I'd probably do something like this:
getMostRecentObsValues(patient: string, date: Date, concepts: string[]);
Or:
getMostRecentObsValues(patient: string, { date: Date, concepts: string[] });
packages/esm-form-entry-app/src/app/form-creation/form-creation.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-creation/form-creation.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-creation/form-creation.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-creation/form-creation.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-data-source/form-data-source.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-data-source/form-data-source.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/openmrs-api/obs-resource.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-data-source/form-data-source.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-data-source/form-data-source.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/form-data-source/form-data-source.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/openmrs-api/concept-resource.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/openmrs-api/obs-resource.service.ts
Outdated
Show resolved
Hide resolved
packages/esm-form-entry-app/src/app/openmrs-api/obs-resource.service.ts
Outdated
Show resolved
Hide resolved
@ibacher @FlorianRappl I have implemented the requested changes, please take another look. |
packages/esm-form-entry-app/src/app/openmrs-api/obs-resource.service.ts
Outdated
Show resolved
Hide resolved
Thanks @ibacher for the commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @FlorianRappl for the approval, I guess we shall merge it after @ibacher and I test the data source in a sample form |
Thanks, @FlorianRappl for the approval, I guess we shall merge it after @ibacher and I test the data source in a sample form |
private extractMostRecentObsConceptIds(questions: Array<Questions>, concepts: Set<string>) { | ||
for (const question of questions) { | ||
const useMostRecentValue = question.questionOptions?.useMostRecentValue ?? false; | ||
if (useMostRecentValue === 'true' || (typeof useMostRecentValue === 'boolean' && useMostRecentValue)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibacher is this going to be a string named "true"
or a boolean true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or this is an angular syntax 🤔 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to support both, since that's what is used elsewhere in the form engine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, thanks for the polish, it looks much better and makes a lot of sense now 👍 .
Requirements
Summary
Screenshots
Related Issue
https://issues.openmrs.org/browse/O3-1661