Synchronizing all orders to OpenERP (needs design)

Adding little bit more here especially for “drug orders”.

  • Concept Attribute (e.g. “sellable”) is only applicable for concepts (obvious) - and this is a good enough solution for “orderable”/“sellable” concepts like tests, panels, fees/charges, procedures.
  • However, for drug orders, the ordered items are “concept drugs” and they are not “concepts”, which means “concept attributes” can not be defined for them.

So, 2 suggestions for drug orders (assuming some are sellable and some not because the clinic does not stock them)

  1. Introduce attributes for “Concept Drugs” - I prefer this. it allows for the drug model to be enhanced and the solution is similar to other entities in openmrs. However, this will take some development effort - build the domain model, enhance REST API, probably build over legacy UI etc etc
  2. Lookup (from somewhere) - whether the drug is “sellable” or not. the lookup mechanism
  • can be a simple file which lists all “sellable” drugs - before adding onto the quotation, a simple check can be done whether the drug is listed there or not. Challenges foreseen would be obviously the upkeep of the lookup list file.
  • Have a Misc Concept “Sellable Drugs” defined with type as coded and all the “sellable” drugs added as answers there. (Why coded? - well that allows concept drugs to be added as answers, rather than a set definition which only allows concepts as members). Then on inspection of any raised order, we can check whether the drug is listed as a answer and if yes, add to quotation.

https://(server)/openmrs/ws/rest/v1/concept/?v=custom:(answers:(uuid,name))