@@ -62,7 +62,6 @@ class EncounterSpecBase(EMRResource):
6262
6363 id : UUID4 = None
6464 status : StatusChoices
65- encounter_class : ClassChoices
6665 period : PeriodSpec = {}
6766 hospitalization : HospitalizationSpec | None = {}
6867 priority : EncounterPriorityChoices
@@ -75,6 +74,7 @@ class EncounterCreateSpec(ExtensionValidator, EncounterSpecBase):
7574 facility : UUID4
7675 organizations : list [UUID4 ] = []
7776 appointment : UUID4 | None = None
77+ encounter_class : ClassChoices
7878
7979 def perform_extra_deserialization (self , is_update , obj ):
8080 if not is_update :
@@ -95,11 +95,6 @@ def perform_extra_deserialization(self, is_update, obj):
9595 obj .status_history = {
9696 "history" : [{"status" : obj .status , "moved_at" : str (timezone .now ())}]
9797 }
98- obj .encounter_class_history = {
99- "history" : [
100- {"status" : obj .encounter_class , "moved_at" : str (timezone .now ())}
101- ]
102- }
10398
10499
105100class EncounterUpdateSpec (ExtensionValidator , EncounterSpecBase ):
@@ -109,10 +104,6 @@ def perform_extra_deserialization(self, is_update, obj):
109104 obj .status_history ["history" ].append (
110105 {"status" : self .status , "moved_at" : str (timezone .now ())}
111106 )
112- if old_instance .encounter_class != self .encounter_class :
113- obj .encounter_class_history ["history" ].append (
114- {"status" : self .status , "moved_at" : str (timezone .now ())}
115- )
116107 if self .discharge_summary_advice is None and is_update :
117108 obj .discharge_summary_advice = None
118109
@@ -121,12 +112,12 @@ class EncounterListSpec(EncounterSpecBase):
121112 patient : dict
122113 facility : dict
123114 status_history : dict
124- encounter_class_history : dict
125115 created_date : datetime .datetime
126116 modified_date : datetime .datetime
127117 tags : list [dict ] = []
128118 current_location : dict | None = None
129119 care_team : list [dict ] = []
120+ encounter_class : ClassChoices
130121
131122 @classmethod
132123 def perform_extra_serialization (cls , mapping , obj ):
0 commit comments