"If, in a single cat1 file, encounters share the same id because they refer to the same visit (e.g. ED visit, hospital admission), but have different times, what should the importer do? The record ends up with the start/end time of the first encounter in the XML file, which is not a reliable source of order."
The 2014 CMS QRDA Cat 1 Eligible Hospital Sample Files April 2014, accessible at http://cms.gov/Regulations-and-Guidance/Legislation/EHRIncentivePrograms/eCQM_Library.html, have a sample file for measure 0435 where all of the encounter ids are 2a620155-9d11-439e-92b3-5d9815ff4de8 (incidentally, the same id as the HL7 Implementation Guide for cat1), but the encounters have the same time.
This issue and #188 address two different approaches to this problem. This issue assumes that, because encounters have the same, id, they should be merged. But if they have different dates/times, then the merge should take that into account - perhaps by taking the earliest start time and latest end time.
In https://groups.google.com/d/topic/pophealth-dev/V0dG0Bq1gPI/discussion we discuss:
"If, in a single cat1 file, encounters share the same id because they refer to the same visit (e.g. ED visit, hospital admission), but have different times, what should the importer do? The record ends up with the start/end time of the first encounter in the XML file, which is not a reliable source of order."
The 2014 CMS QRDA Cat 1 Eligible Hospital Sample Files April 2014, accessible at http://cms.gov/Regulations-and-Guidance/Legislation/EHRIncentivePrograms/eCQM_Library.html, have a sample file for measure 0435 where all of the encounter ids are 2a620155-9d11-439e-92b3-5d9815ff4de8 (incidentally, the same id as the HL7 Implementation Guide for cat1), but the encounters have the same time.
This issue and #188 address two different approaches to this problem. This issue assumes that, because encounters have the same, id, they should be merged. But if they have different dates/times, then the merge should take that into account - perhaps by taking the earliest start time and latest end time.