Skip to content

ED 42 | flag bacteriology data that have smear but no culture results#1

Open
shakjaf110 wants to merge 1 commit into
release-0.88from
bacteriology-flag
Open

ED 42 | flag bacteriology data that have smear but no culture results#1
shakjaf110 wants to merge 1 commit into
release-0.88from
bacteriology-flag

Conversation

@shakjaf110
Copy link
Copy Markdown

On the patients general tab under the bacteriology widget the team would like that the sputum that have smear results but no culture and if the difference between the current date and sample collection date is greater than 60 days then this be flagged. We could use "red" as the color of the flag.

@mseaton
Copy link
Copy Markdown
Member

mseaton commented Jul 6, 2017

@shakjaf110 - My first reaction in looking at this is that it is a very specific set of requirements to hard-code directly into bahmniapps. Biggest initial concerns are the hard-coded date windows of 60 days, and hard-coded concept short names. Can you see about making this a bit more configurable in some way, or make it something that can be overridden in implementation config? @mogoodrich

@mogoodrich
Copy link
Copy Markdown

Thanks again @shakjaf110 . I had a similar reaction to @mseaton, but it may be that it's okay to add this functionality to bahmniapps... I've referenced David Oh on the ticket to ask his opinion.

Regardless, I think it would be clearer to move the logic of determining whether a culture is "late" or not into the Speciman.js object via adding a "hasCultureResult" function or something similar.

But let's see what David has to say first in response to my questions and then we can continue to flesh out changes we'd like to make.

@davidoh
Copy link
Copy Markdown

davidoh commented Aug 2, 2017

@mogoodrich - sorry for the delayed response.

At first glance the feature seems specific to the metadata of a particular implementation, i.e. "smear results" and "culture results", however it is also possible that smear/culture results are a standard domain concept for bacteriology tests; this is a question best answered by a domain expert.

I would suggest we raise a ticket on OpenMRS Talk to ascertain:

  • From a domain perspective, whether it makes sense to build functionality around smear/culture results into Bahmni
  • Apart from modifying the display control in BahmniApps, whether there is an alternative approach to accomplish the same functionality

I agree with @mogoodrich's suggestions around refactoring the domain logic into the specimen object, however I also have a question around the existing logic in the view:

<div ng-if="diffDays[specimen.specimenId]>60 && step.shortName == 'Smear Microscopy Test Results'">
    <span class="specimenIdIfHasNoCultureResult" ...

If I understand the code correctly, this checks whether the current observation is the Smear Result, but how does it know that the Culture Result is missing?

@mogoodrich
Copy link
Copy Markdown

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.

4 participants