When a new surgery is a added to a patient's treatments on their medical profile, if the surgery date is left blank, the portal stops working for that patient. #510
When a new surgery is created, its details are stored in obs table as 11 separate records with the same encounter_id.
The surgery date is saved with a concept_id = 162842 and in the value_datetime column in the format yyyy-mm-dd hh:mm:ss. Setting the surgery date restores portal function. However, we can't always know what the surgery date is if the patient entered a blank date.
When a new surgery is created, its details are stored in
obs
table as 11 separate records with the sameencounter_id
.The surgery date is saved with a
concept_id = 162842
and in thevalue_datetime
column in the formatyyyy-mm-dd hh:mm:ss
. Setting the surgery date restores portal function. However, we can't always know what the surgery date is if the patient entered a blank date.