ecohealthalliance / eidith-cleaning-reports

0 stars 2 forks source link

Add logic #9

Closed emmamendelsohn closed 5 years ago

emmamendelsohn commented 5 years ago

Addresses issue #8. A couple notes:

noamross commented 5 years ago

Thanks @emmamendelsohn! @tmorourk, can you comment on Emma's flag above?

tmorourk commented 5 years ago

Thanks @emmamendelsohn I will take a look. The last bullet doesn't make sense to me (natural areas shouldn't have a value in AnimalUseProducedSold) but I'll double check.

emmamendelsohn commented 5 years ago

@tmorourk The example I referenced is in the Thailand animal table. Looks like there are 35 cases of AnimalUseProducedSold = "food" when DiseaseTransmissionInterfaces = "natural areas".

Perhaps we need to incorporate a check to confirm that all values are empty when a condition is not met?

emmamendelsohn commented 5 years ago

To provide another example of the issue raised in the second bullet:

We have a condition where DurationDays in the Event table should only be checked when DiseaseTransmissionInterfaces is not human hospital. However, there are cases where DurationDays is populated when the DiseaseTransmissionInterfaces is human hospital (e.g., Bangladesh).

tmorourk commented 5 years ago

Hi Emma, I was wrong about the AnimalUseProducedSold - this should have a value if the AnimalHumanInterfaces are: hunted for sale in restaurant for sale in small market (< 5 vendors) for sale in medium market (5-20 vendors) for sale in large market (> 20 vendors) at abattoir/slaughterhouse at temporary holding facility in value chain in transit along the value chain animal or animal product destined for consumption

Also, I was wrong about the DurationDays - it is collected for hospital events, so you can remove that rule.

So sorry for the extra work!!

emmamendelsohn commented 5 years ago

No worries @tmorourk -- easy fixes. Thanks for looking into it!

noamross commented 5 years ago

OK, I've incorporated @tmorourk's comments and will merge these changes in.