Hi Team,
We have a query related to few functions for CMS108v8:
Query 1:
Global.HospitalizationWithObservation(Encounter "Encounter, Performed")
Encounter Visit
let ObsVisit: Last(["Encounter, Performed": "Observation Services"] LastObs
where LastObs.relevantPeriod ends 1 hour or less on or before start of Visit.relevantPeriod
sort by
end of relevantPeriod
),
VisitStart: Coalesce(start of ObsVisit.relevantPeriod, start of Visit.relevantPeriod),
EDVisit: Last(["Encounter, Performed": "Emergency Department Visit"] LastED
where LastED.relevantPeriod ends 1 hour or less on or before VisitStart
sort by
end of relevantPeriod
)
return Interval[Coalesce(start of EDVisit.relevantPeriod, VisitStart),
end of Visit.relevantPeriod]
In the above function please confirm whether we need to create multiple ED/Obs entries to test the LastED or LastObs cases as highlighted below.
If Yes, then how are we supposed to create multiple ED/Obs entries Kindly help us with examples because as per our understanding there can be only one ED location for an encounter
Query2:
During VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Interval[Global."ToDate"(start of Global."HospitalizationWithObservation"(Encounter)), Global."ToDate"(start of Encounter.relevantPeriod + 2 days))
Interpretation:
Interval[Global."ToDate"(start of EDVisit.relevantPeriod (Enounter)), Global."ToDate"(start of Encounter.relevantPeriod + 2 days)]
where LastED.relevantPeriod ends 1 hour or less on or before Coalesce(start of ObsVisit.relevantPeriod, start of Visit.relevantPeriod)
OR
Interval[Global."ToDate"(start of ObsVisit.relevantPeriod (Enounter)), Global."ToDate"(start of Encounter.relevantPeriod + 2 days)]
where LastObs.relevantPeriod ends 1 hour or less on or before start of Visit.relevantPeriod
OR
Interval[Global."ToDate"(start of Visit.relevantPeriod (Enounter)), Global."ToDate"(start of Encounter.relevantPeriod + 2 days)]
If the above interpretation is correct, then kindly confirm whether the highlighted encounter would be respective ED/Obs/IP encounter
Query3:
During TJC."CalendarDayOfOrDayAfter" ( end of AnesthesiaProcedure.relevantPeriod)
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) ( end of AnesthesiaProcedure.relevantPeriod)
Kindly confirm if StartValue = end of AnesthesiaProcedure.relevantPeriod in above scenario
+Query4: +
TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.relevantPeriod)
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) "(start of QualifyingEncounter.relevantPeriod)
Kindly confirm whether the Qualifying encounter highlighted above will be only IP or it can be anyone from ED/Obs/IP
Query5:
TJC."CalendarDayOfOrDayAfter"(start of Global."HospitalizationWithObservation")
Interpretation:
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) (start of EDVisit.relevantPeriod)
OR
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) (start of ObsVisit.relevantPeriod)
OR
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) (start of Visit.relevantPeriod)
Kindly confirm if the above Interpretation is correct.
Query6:
No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure
from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure, Performed": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal
where AnesthesiaProcedure.relevantPeriod ends 1 day after day of start of QualifyingEncounter.relevantPeriod
and PatientRefusal.authorDatetime during TJC."CalendarDayOfOrDayAfter"(
end of AnesthesiaProcedure.relevantPeriod
)
return QualifyingEncounter
TJC.CalendarDayOfOrDayAfter(StartValue DateTime)
Interval[Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days))
For the above condition consider if the start value is Anesthesia end date which is on 01/16/2019 13:00:00, so TJC.CalendarDayOfOrDayAfter(StartValue DateTime) will be calculated as below:
"Interval [Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days))"
As per our understanding the "ToDate" operator converts the value of its argument to a Date value & the interval is starting with square bracket "[" and ending with parantheses ")" which means Interval [Global."ToDate"(StartValue), Global."ToDate"(StartValue + 2 days)) will be calculated as below:
Interval [Global. "ToDate (01/16/2019 13:00:00), Global."ToDate"(01/16/2019 13:00:00 + 2 days)) so the Interval which needs to be considered is from 01/16/2019 till 01/17/2019 since the ToDate operator converts the argument to Date and "+2 days" is closed with ")" parantheses which means less then 2 days should be added.
Please let us know if our understanding is correct or not