Skip to content

Conversation

@bjoshuadevelopment
Copy link
Contributor

No description provided.

(`name`,`description`,`creator`,`date_created`,`uuid`)
VALUES
(
"Drug Order Encounter","for orders without encounters",1,now(),@EncTUUID);
Copy link
Member

@mseaton mseaton Apr 28, 2020

Choose a reason for hiding this comment

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

Are we sure that this is what we want to name this encounter type? And can the description be capitalized?


/* select the unknown provider */

SELECT @UnknownProvider := provider_id FROM provider WHERE uuid="6a7d7d04-f523-11e5-9ce9-5e5517507c66";
Copy link
Member

Choose a reason for hiding this comment

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

Do we always want to use the unknown provider? Or are there cases where we'd want to use the creator's provider account?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would work if ticket RWA-805 "Ensure all orders creators are providers" is done

Copy link
Member

Choose a reason for hiding this comment

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

@bjoshuadevelopment I'm not sure this is true. My understanding of what @jberchmas did in RWA-801 is to retrieve the unknown provider uuid by provider name, and then use this to set the uuid as a global property, as the uuid is different on Rwink and Butaro servers. So as written, I don't think your migration will work on both Rwink and Butaro.

I'd recommend one of two approaches:

a) Ensure your migration runs after the one in RWA-801, and change your code above to get the unknownprovider uuid from the global_property table that RWA-801 is populating.

b) Create a common function that is part of a library of functions we create before any migrations execute, and which can be used by both migration scripts to retrieve the uuid of the unknown provider (we can follow this pattern for other sql functions that might help with our migrations). eg.

create or replace function unknown_provider_uuid() as ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considering this ticket to depend on RWA-819 where all creators of encounters will be providers

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