Skip to content

Instantly share code, notes, and snippets.

@lordlycastle
Last active January 28, 2019 13:22
Show Gist options
  • Save lordlycastle/10783be02aa9a62c069d0768b1bb78a2 to your computer and use it in GitHub Desktop.
Save lordlycastle/10783be02aa9a62c069d0768b1bb78a2 to your computer and use it in GitHub Desktop.
the american healthcare in a gist.
import time
from healthcare import private_healthcare as healthcare # no going back after this.
import AI2IF
class AIDoc(object):
base_charge = 200 # admin fee
min_patient_wait_duration = 60 * 10 # in seconds. 10 min.
def check_patients(self, patient):
time.sleep(min_patient_wait_duration + random.randint(1, 6) * 60)
if patient.has_symptoms:
patient.supply_medication()
if patient.medication.has_side_effects():
check_patients(patient)
return
else:
try:
patient.find_any_annoying_symptoms() # may throw error when patient is under "stress"
check_patients(patient)
return
except:
patient.reschedule_for_regular_checkup()
patient.give_back_pats()
patient.supply_cheque(self.base_charge, [issue.test_prices() for issue in patient.diagnosed_symptoms] )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment