covid19-etl/etl/idph_hospital.py
def parse_region(self, date, hospital_region):
        """
        From county-level data, generate the data we can submit via Sheepdog
        """
        region = hospital_region["region"]
        region_description = hospital_region["region_description"]

        summary_location_submitter_id = format_submitter_id(
            "summary_location",
            {
                "project": "idph_hospital",
                "country": self.country,
                "state": self.state,
                "region": region,
            },
        )

        summary_location = {
            "country_region": self.country,
            "submitter_id": summary_location_submitter_id,
            "projects": [{"code": self.project_code}],
            "province_state": self.state,
            "state_hospital_region": region,
            "state_region_description": strip_prefix(region_description),
        }

        summary_clinical_submitter_id = derived_submitter_id(
            summary_location_submitter_id,
            "summary_location",
            "summary_clinical",
            {"project": "idph_hospital", "date": date},
        )

        summary_clinical = {
            "submitter_id": summary_clinical_submitter_id,
            "date": date,
            "summary_locations": [{"submitter_id": summary_location_submitter_id}],
            "region_icu_avail": hospital_region["ICUAvail"],
            "region_icu_capacity": hospital_region["ICUCapacity"],
            "region_vents_available": hospital_region["VentsAvailable"],
            "region_vents_capacity": hospital_region["VentsCapacity"],
        }

        return summary_location, summary_clinical

        From county-level data, generate the data we can submit via Sheepdog
        
From county-level data, generate the data we can submit via Sheepdog
From county - level data generate the data we can submit via Sheepdog
def parse_region(self, date, hospital_region):
        region = hospital_region["region"]
        region_description = hospital_region["region_description"]
        summary_location_submitter_id = format_submitter_id(
            "summary_location",
            {
                "project": "idph_hospital",
                "country": self.country,
                "state": self.state,
                "region": region,
            },
        )
        summary_location = {
            "country_region": self.country,
            "submitter_id": summary_location_submitter_id,
            "projects": [{"code": self.project_code}],
            "province_state": self.state,
            "state_hospital_region": region,
            "state_region_description": strip_prefix(region_description),
        }
        summary_clinical_submitter_id = derived_submitter_id(
            summary_location_submitter_id,
            "summary_location",
            "summary_clinical",
            {"project": "idph_hospital", "date": date},
        )
        summary_clinical = {
            "submitter_id": summary_clinical_submitter_id,
            "date": date,
            "summary_locations": [{"submitter_id": summary_location_submitter_id}],
            "region_icu_avail": hospital_region["ICUAvail"],
            "region_icu_capacity": hospital_region["ICUCapacity"],
            "region_vents_available": hospital_region["VentsAvailable"],
            "region_vents_capacity": hospital_region["VentsCapacity"],
        }
        return summary_location, summary_clinical
def parse_region ( self , date , hospital_region ) : region = hospital_region [ "region" ] region_description = hospital_region [ "region_description" ] summary_location_submitter_id = format_submitter_id ( "summary_location" , { "project" : "idph_hospital" , "country" : self . country , "state" : self . state , "region" : region , } , ) summary_location = { "country_region" : self . country , "submitter_id" : summary_location_submitter_id , "projects" : [ { "code" : self . project_code } ] , "province_state" : self . state , "state_hospital_region" : region , "state_region_description" : strip_prefix ( region_description ) , } summary_clinical_submitter_id = derived_submitter_id ( summary_location_submitter_id , "summary_location" , "summary_clinical" , { "project" : "idph_hospital" , "date" : date } , ) summary_clinical = { "submitter_id" : summary_clinical_submitter_id , "date" : date , "summary_locations" : [ { "submitter_id" : summary_location_submitter_id } ] , "region_icu_avail" : hospital_region [ "ICUAvail" ] , "region_icu_capacity" : hospital_region [ "ICUCapacity" ] , "region_vents_available" : hospital_region [ "VentsAvailable" ] , "region_vents_capacity" : hospital_region [ "VentsCapacity" ] , } return summary_location , summary_clinical
From county-level data, generate the data we can submit via Sheepdog
From county - level data generate the data we can submit via Sheepdog
"""
        From county-level data, generate the data we can submit via Sheepdog
        """
self
date
hospital_region