By following this guide, you will learn where to locate and access the Admission & Discharge Locations dataset within PCC.
In PCC replicated database, hospitals can be found in view_ods_external_facility. External facilities represent many different location types, funeral homes, hospitals, other post acute operations and home.
You might think searching for the primary key (ExternalLocationID) in the schema will help you find out how to join data. It does not.
SELECT * FROM information_schema.columns WHERE column_name like '%ExternalLocationID%'
The query above returns one result and that is for itself! Ouch.
In my opinion, the above makes figuring this out very challenging. Let’s talk about how to join this data on the census records (view_ods_patient_census). What we find here is the field AdmitDischargeLocationID. Believe it or not, this field can be joined to view_ods_external_facility.
It is a bit confusing since this field is used for two separate concepts (Admissions & Discharges). How they handle this is by turning the ID’s either:
- + positive for admissions
- – negative for discharges
Knowing this, we can join by using the absolute function on AdmitDischargeLocationID field.
Admission & Discharge Query Example:
View_ods_patient_census JOIN View_ods_external_facility ON view_ods_external_facility.ExternalLocationID = ABS(view_ods_patient_census.AdmitDischargeLocationID)
Kevin Baker
President
Data Services Partners
Hi, I’m Kevin.
As former Director of Data Services at Ensign Services, a publicly traded company, I have an extensive background and expertise in the Skilled Nursing sector and the needs of both the management and information technology sides of the business. We’re experts in the systems and metrics that support Skilled Nursing and Post Acute Healthcare businesses.
My passion is helping businesses transform their data into actionable information to make better business decisions. We are developers you can trust. Data is our passion.
If you have a question about this article, or want to have a discussion about it, let’s chat!
Did you like what you read?
Keep up with our analysis, coverage, and helpful information regarding the Skilled Nursing sector by joining our mailing list.
We are developers you can trust. Data is our passion.
Your email address is safe with us. We never pass your information to third-parties and you can opt out at any time.
Looking forward to connecting with you!