covid19-etl/etl/idph_facility.py
def parse_facility(self, date, facility):
        """
        From county-level data, generate the data we can submit via Sheepdog
        """
        county = facility["County"]
        facility_name = facility["FacilityName"]
        confirmed_cases = facility["confirmed_cases"]
        deaths = facility["deaths"]
        status = facility.get("status", None)
        etlJobDate = datetime.date.today().strftime("%Y-%m-%d")
        summary_location_submitter_id = format_submitter_id(
            "summary_location",
            {
                "country": self.country,
                "state": self.state,
                "facility_name": facility_name,
                "reporting_org_status": status,
            },
        )

        summary_location = {
            "country_region": self.country,
            "submitter_id": summary_location_submitter_id,
            "projects": [{"code": self.project_code}],
            "province_state": self.state,
            "county": county,
            "reporting_org": facility_name,
            "reporting_org_status": status,
        }

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

        summary_clinical = {
            "confirmed": confirmed_cases,
            "deaths": deaths,
            "submitter_id": summary_clinical_submitter_id,
            "lastUpdateEt": etlJobDate,
            "date": date,
            "summary_locations": [{"submitter_id": summary_location_submitter_id}],
        }

        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_facility(self, date, facility):
        county = facility["County"]
        facility_name = facility["FacilityName"]
        confirmed_cases = facility["confirmed_cases"]
        deaths = facility["deaths"]
        status = facility.get("status", None)
        etlJobDate = datetime.date.today().strftime("%Y-%m-%d")
        summary_location_submitter_id = format_submitter_id(
            "summary_location",
            {
                "country": self.country,
                "state": self.state,
                "facility_name": facility_name,
                "reporting_org_status": status,
            },
        )
        summary_location = {
            "country_region": self.country,
            "submitter_id": summary_location_submitter_id,
            "projects": [{"code": self.project_code}],
            "province_state": self.state,
            "county": county,
            "reporting_org": facility_name,
            "reporting_org_status": status,
        }
        summary_clinical_submitter_id = derived_submitter_id(
            summary_location_submitter_id,
            "summary_location",
            "summary_clinical",
            {"date": date},
        )
        summary_clinical = {
            "confirmed": confirmed_cases,
            "deaths": deaths,
            "submitter_id": summary_clinical_submitter_id,
            "lastUpdateEt": etlJobDate,
            "date": date,
            "summary_locations": [{"submitter_id": summary_location_submitter_id}],
        }
        return summary_location, summary_clinical
def parse_facility ( self , date , facility ) : county = facility [ "County" ] facility_name = facility [ "FacilityName" ] confirmed_cases = facility [ "confirmed_cases" ] deaths = facility [ "deaths" ] status = facility . get ( "status" , None ) etlJobDate = datetime . date . today ( ) . strftime ( "%Y-%m-%d" ) summary_location_submitter_id = format_submitter_id ( "summary_location" , { "country" : self . country , "state" : self . state , "facility_name" : facility_name , "reporting_org_status" : status , } , ) summary_location = { "country_region" : self . country , "submitter_id" : summary_location_submitter_id , "projects" : [ { "code" : self . project_code } ] , "province_state" : self . state , "county" : county , "reporting_org" : facility_name , "reporting_org_status" : status , } summary_clinical_submitter_id = derived_submitter_id ( summary_location_submitter_id , "summary_location" , "summary_clinical" , { "date" : date } , ) summary_clinical = { "confirmed" : confirmed_cases , "deaths" : deaths , "submitter_id" : summary_clinical_submitter_id , "lastUpdateEt" : etlJobDate , "date" : date , "summary_locations" : [ { "submitter_id" : summary_location_submitter_id } ] , } 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
facility