Skip to content

Conversation

@bjoshuadevelopment
Copy link
Contributor

Ensure all forms specify a provider type as we created providers for some data officers

Copy link
Member

@mseaton mseaton left a 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"
)
;
Copy link
Member

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
;
Copy link
Member

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"
Copy link
Member

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=%"
;
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants