covid19-etl/etl/idph_facility.py
def files_to_submissions(self):
        """
        Reads JSON file and convert the data to Sheepdog records
        """

        latest_submitted_date = self.metadata_helper.get_latest_submitted_date_idph()
        today = datetime.date.today()
        if latest_submitted_date == today:
            print("Nothing to submit: today and latest submitted date are the same.")
            return
        begin_date = (latest_submitted_date + datetime.timedelta(days=1)).strftime(
            "%m/%d/%Y"
        )
        end_date = today.strftime("%m/%d/%Y")
        print(f"Getting data for dates: {begin_date} - {end_date}")
        url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetLTCFacilityHistorical?beginDate={begin_date}&endDate={end_date}"
        self.parse_file(url)

        Reads JSON file and convert the data to Sheepdog records
        
Reads JSON file and convert the data to Sheepdog records
Reads JSON file and convert the data to Sheepdog records
def files_to_submissions(self):
        latest_submitted_date = self.metadata_helper.get_latest_submitted_date_idph()
        today = datetime.date.today()
        if latest_submitted_date == today:
            print("Nothing to submit: today and latest submitted date are the same.")
            return
        begin_date = (latest_submitted_date + datetime.timedelta(days=1)).strftime(
            "%m/%d/%Y"
        )
        end_date = today.strftime("%m/%d/%Y")
        print(f"Getting data for dates: {begin_date} - {end_date}")
        url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetLTCFacilityHistorical?beginDate={begin_date}&endDate={end_date}"
        self.parse_file(url)
def files_to_submissions ( self ) : latest_submitted_date = self . metadata_helper . get_latest_submitted_date_idph ( ) today = datetime . date . today ( ) if latest_submitted_date == today : print ( "Nothing to submit: today and latest submitted date are the same." ) return begin_date = ( latest_submitted_date + datetime . timedelta ( days = 1 ) ) . strftime ( "%m/%d/%Y" ) end_date = today . strftime ( "%m/%d/%Y" ) print ( f"Getting data for dates: {begin_date} - {end_date}" ) url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetLTCFacilityHistorical?beginDate={begin_date}&endDate={end_date}" self . parse_file ( url )
Reads JSON file and convert the data to Sheepdog records
Reads JSON file and convert the data to Sheepdog records
"""
        Reads JSON file and convert the data to Sheepdog records
        """
self