-
Notifications
You must be signed in to change notification settings - Fork 2
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
PER-341 Configure locations #6
Conversation
As far as I can see, the locations configuration is working properly. It was kind of tricky to make it work on initial setup, but now it's fine. Waiting for review in order to merge it into the master branch. |
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.
Awesome, great work!
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.
@brandones why are we using both the "Tag|[Tag Name]" and "Tags" columns here? It looks like there is redundancy?
Otherwise looks good!
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.
Oops! Good eye, @mogoodrich . Yeah, @aastupilloses , please don't use the Tags
domain. Instead, add Tag|xyz
columns for each Location Tag type you want to manage. If the Location Tag is one that isn't already in the EMR, please add them in a LocationTags CSV.
I have removed the Tag|XYZ columns due to the mentioned redundancy and because I was not able to use that format for all the tags declared on Tags column because after trying to do that I was getting an error when running the OpenMRS server that was giving me no clue about what was wrong. I'll request you to review this again. Thanks! |
Oh, interesting. @aastupilloses , could you share the erroring server logs and the CSV that produced it (the one with The reason we prefer |
@brandones I think you are correct. Here's the list of tags that installed by default within the PIH EMR: It looks like the Facility Location tag is not defined by the PIH EMR (and maybe others, but I noticed that one)... So if you want to add new location tags you will need to create a Location Tags CSV (see link Brandon provided above)... and then the "Tag|XYZ" format should work. This model/error is actually intentional... as Brandon said, using the "Tags" column magically creates the tags for you, which is nice, but there's no validation, so if for some reason you misspell "Facity" or something in one of the rows it will create a duplicate erroneous tag silently. We want to explicitly define each tag we want to use so we can validate there are no errors. That being said, if this is what was happening in your case, if the error wasn't clear then validation isn't particularly helpful! Would be great to see the error you got. The location tag stuff was recently refactored, so you are getting to be one of the first to test it out, so thanks for helping us out and apologies for any of the difficulties... :) |
Yes please |
Hi, @brandones. Actually, the error message was a very generic one. Something related to a not found view, which lead me to think that it was not the CSV file parsing/formatting exception message, but the message of an exception caused due to not being able to build the locations configuration properly before. I also checked the stacktrace but I didn't find something useful at first sight. But, considering what @mogoodrich says, I will use the provided Java file to check which tags are not bundled with the base OpenMRS configuration and after that I would add them to the Location Tags CSV file and try again. |
Thanks @aastupilloses ... yeah, there was likely something buried in the stack trace, unfortunately... @brandones might be worth checking what the code does. |
@aastupilloses Yeah, the stack trace shown in the browser is often useless. If there's something valuable in it, it's usually toward one of the bottom few exceptions shown. More likely the useful error would be in the server log. The server log is the thing to keep an eye on. Your team is going to get very good at reading it. |
Thank you for your support, @brandones. This settings file is working as expected on my local instance. Waiting for your approval or comments. |
@aastupilloses I don't think we use "Facility Location" for anything. You can get rid of that one if you like. Great work! |
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 am assuming, based on your testing, that the locations inherit their location tag permissions from the parent location "COR," and that you can therefore do things like view patients while logged in at them.
Strange, as the build went through, I would have thought this should be up on peru-ci.pih-emr.org by now? Am I missing something? If not, let me know, and I could research more tomorrow... |
https://pihemr.atlassian.net/browse/PER-341