In order to create a new Drug Order for a Patient using rest api :
How do I create Encounter (Or shall I fetch any existing encounter, @hariniparth is using an exisintg encouter type to create a new one line 338)
What will be encounter type for “Drug Order Encounter”.
What will be the care settings
What will be the provider.
What will be the location. (Is it the location of logged in user?)
Is date time “now”?
Does back end checks patient allergic drugs or front end has to check it?
What will be encounter type. I have seen this list in production database.
Or should I create encounter type “drug order”
Yes I suggest creating a new encounter type called “Drug Order”
My assumption is that in a real world setting there would naturally be some sort of encounter that occurred where an orderable was ordered by a health provider, so you wouldn’t have to figure out the encounter and its type. If you are just setting up test data, then you can use any encounter of your choice.
How do I Obtain CareSettings when I place a new Drug Order.
Via the Java API:
Context.getOrderService().getCareSettingByName("Outpatient"); //Fetch Outpatient care setting
Context.getOrderService().getCareSettingByName("Inpatient"); //Fetch Inpatient care setting
Via the rest API:
GET .../ws/rest/v1/caresetting/Outpatient //Fetch Outpatient care setting
GET .../ws/rest/v1/caresetting/Inpatient //Fetch Inpatient care setting
Of course you could use the uuids in place of the names of the care settings
Thank you for the reply. But How do we determine from which area Drug is being ordered out of those to available Care Settings.
Or Shall I put a drop down for the user to select.
That is an implementation detail, as a developer you might not know in which setting the order was placed but the user will always do, therefore in your user interface you can prompt the user to select the appropriate one from the two.
Thank you Wyclif. I have got the answer.
Where we are calculating this line for Drug Order:
“display”: “(NEW) Ibuprofen 400 MG Oral Tablet: 1.0 Tablet Oral Four times daily 7 Days test dosing instructions”,