Getting error while saving bahmni encounter in openmrs 2.5.10

Hi @dkayiwa ,

I’m getting this error while saving the encounter - ERROR - BaseRestController.handleException(124) |2023-06-01T05:21:52,318| ‘DrugOrder(1.0Concept #170324090 of CROCIN PAIN RELIEF from null to Thu Jun 01 00:00:00 UTC 2023)’ failed to validate with reason: doseUnits: The units concept must be among allowed concepts, quantityUnits: The units concept must be among allowed concepts org.openmrs.api.ValidationException: ‘DrugOrder(1.0Concept #170324090 of CROCIN PAIN RELIEF from null to Thu Jun 01 00:00:00 UTC 2023)’ failed to validate with reason: doseUnits: The units concept must be among allowed concepts, quantityUnits: The units concept must be among allowed concepts

I looked at the global props and every uuid seems to be fine. What can be the reason behind this error ?

Can you cross check to confirm that each uuid points to an existing concept?

Yes all the uuids point to a concept and that concept is also a concept set.

order.dosingInstructionsConceptUuid	fa70429a-bbcd-11eb-8d47-02a85f324ec8
order.drugDispensingUnitsConceptUuid	162402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
order.drugDosingUnitsConceptUuid	162384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
order.drugRoutesConceptUuid	162394AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
order.durationUnitsConceptUuid	1732AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Which quantityUnits and doseUnits did you select?

These are set to “mg”.

Any solution found for this?

Got similar issues. Is there any way to disable to not depend on SNOMED CT?

code : "org.openmrs.validator.ValidateUtil:88"
detail : "org.openmrs.api.ValidationException: 'DrugOrder(2
message : "['DrugOrder(2.0Concept #63 of Paracetamol 120 mg/5 mL Suspension from null to null)' failed to validate with reason: durationUnits: Duration units must be mapped to SNOMED CT duration code with the map type set to SAME-AS]"

There’s currently no version of OpenMRS that supports duration units that are not also mapped to SNOMED codes, as we have a few internal calculations that get performed with those durations.

The duration units like hours, seconds, days, months are expecting to have SNOMED-CT mappings after openmrs version upgrade. But in the previous version of Bahmni just SNOMED mapping was fine. Not sure this issue is caused due to Openmrs or Bahmni upgrade

OpenMRS Core doesn’t care about the name of the system, but it needs to have it’s “HL7 Code” property set to “SCT”, so it’s likely due to a change in either the Bahmni metadata or the metadata of your instance.

Was this changed post the OpenMRS upgrade?

Asking this because previously the metadata mapping having SNOMED worked. Now it expects to have SNOMEDCT after Bahmni’s upgrade. Thanks @ibacher will check with the team regarding the mapping.

No. This is not anything new.