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

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

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

  ###
