     super @entry
     @_admissionDatetime = @entry.admitTime
     @_dischargeDatetime = @entry.dischargeTime
-    @_facilityLocation = @entry.facility.name
-    @_facilityLocationArrivalDatetime = @entry.facility.start_time
-    @_facilityLocationDepartureDatetime = @entry.facility.end_time
+    @_facilityLocation = @entry.facility?['name']
+    @_facilityLocationArrivalDatetime = @entry.facility?['start_time']
+    @_facilityLocationDepartureDatetime = @entry.facility?['end_time']
     @_reason = @entry.reason
 
   ###

    @_diagnosis = @entry.diagnosis
    @_dischargeDatetime = @entry.dischargeTime
    @_dischargeStatus = @entry.dischargeDisposition
    @_facilityLocation = @entry.facility.name
    @_facilityLocationArrivalDatetime = @entry.facility.start_time
    @_facilityLocationDepartureDatetime = @entry.facility.end_time
    @_negationRationale = @entry.negationRationale
    @_reason = @entry.reason
    @_principalDiagnosis = @entry.principalDiagnosis

class CQL_QDM.EncounterRecommended extends CQL_QDM.QDMDatatype
  constructor: (@entry) ->
    super @entry
    @_facilityLocation = @entry.facility?['name']
    @_negationRationale = @entry.negationRationale
    @_reason = @entry.reason
    @_startDatetime = @entry.admitTime
