-
Notifications
You must be signed in to change notification settings - Fork 0
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
UP-45 Ensure all forms specify a provider type as we created provider… #10
base: master
Are you sure you want to change the base?
Conversation
…s for some data officers
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.
@bjoshuadevelopment and @mogoodrich see my comments below. Let's find a time to discuss and figure out our strategy for provider management. @toddrobertanderson FYI
"Role to differentiate practicing providers from other user providers", | ||
"36a4a54d-ab0a-11ea-8991-3c6aa7d72242" | ||
) | ||
; |
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.
This is an area where we might need to at least consider how we are modeling providers in Rwanda going forward. The standard in OpenMRS RefApp and PihCore is to use the ProviderManagement module (originally written for Rwanda ironically), which adds a "ProviderRole" attribute to Provider. This is intentionally not the same as a "User Role", as User Roles are intended to be more about permissions and are attached to users, while Providers are not required to be linked to users.
There is an " tag in htmlformentry that utilizes this, and we'd presumably change all of our tags to tags.
@mogoodrich can you comment on this and help us to work out the approach you'd recommend here?
Pr.person_id=US.person_id | ||
WHERE | ||
US.retired!=1 AND Pr.retired!=1 | ||
; |
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.
Per above comment, we might choose to implement this as inserting into providermanagement_* tables to associate provider roles, rather than inserting user roles. We need to figure this out.
<changeSet id="rwandaemr-ensure-forms-select-practicing-providers" author="IMB"> | ||
<preConditions onFail="HALT"> | ||
<sqlCheck expectedResult="1"> | ||
SELECT count(*) FROM role WHERE role = "Practicing provider" |
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.
I don't think this is necessary, as this won't execute if the above changeset fails, but I guess it can't hurt.
xml_data = REPLACE(xml_data, '<encounterProvider', '<encounterProvider role="Practicing provider"') | ||
WHERE | ||
xml_data LIKE "%<encounterProvider%" AND xml_data NOT LIKE "%role=%" | ||
; |
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.
I think you might want your where clause to be more specific, eg. AND xml_data NOT LIKE "%<encounterProvider role=%". It's possible that "role=" appears elsewhere in your xml for other reasons.
Ensure all forms specify a provider type as we created providers for some data officers