raw_schema(agent((patient,_)),100). raw_schema(patient,100). raw_schema(medicalteam((team,_)),100). raw_schema(patientwithtpc((tpc,_)),100). raw_schema(patientwithtpc,100). raw_schema(grad,100). raw_schema(thirdparty((patient,_)),100). raw_schema(medicalmanager,100). raw_schema(agent((self,_)),100). raw_schema(referreddoctor((patient,_)),100). raw_schema(manager,100). raw_schema(primarydoctor((patient,_)),100). raw_schema(nurse,100). raw_schema(doctor,100). raw_schema(doctor((patient,_)),100). raw_schema(employee,100). raw_schema(receptionist,100). raw_schema(undergrad,100). raw_schema(primarydoctor((self,_)),100). raw_schema(patient((patient,_)),100). can_assign(doctor((patient,P)), [], [], thirdparty((patient,P))). can_assign(doctor((patient,P)), [doctor((patient,N1))],[], referreddoctor((patient,P))). can_assign(doctor((patient,P)), [doctor],[], referreddoctor((patient,P))). can_assign(medicalmanager, [doctor((patient,N1))],[], medicalteam((team,T))). can_assign(medicalmanager, [doctor],[], medicalteam((team,T))). can_assign(medicalmanager, [nurse],[], medicalteam((team,T))). can_assign(manager, [], [], employee). can_assign(manager, [], [], medicalmanager). can_assign(manager, [], [doctor((patient,N1)), doctor], receptionist). can_assign(manager, [], [], nurse). can_assign(manager, [], [receptionist], doctor). can_assign(patient((patient,N1)), [], [], agent((patient,Self))). can_assign(patient, [], [], agent((patient,Self))). can_assign(patient((patient,N1)), [doctor((patient,N1))],[], primarydoctor((patient,Self))). can_assign(patient, [doctor((patient,N1))],[], primarydoctor((patient,Self))). can_assign(patient((patient,N1)), [doctor],[], primarydoctor((patient,Self))). can_assign(patient, [doctor],[], primarydoctor((patient,Self))). can_assign(receptionist, [], [primarydoctor((patient,P))], patient((patient,P))). can_assign(receptionist, [doctor((patient,N1))],[], doctor((patient,P))). can_assign(receptionist, [doctor],[], doctor((patient,P))). can_assign(thirdparty((patient,P)), [patient((patient,P))],[], patientwithtpc((tpc,Self))). can_revoke(doctor,thirdparty((patient,P))). can_revoke(doctor((patient,N1)),thirdparty((patient,P))). can_revoke(doctor((patient,P)),referreddoctor((patient,P))). can_revoke(medicalmanager,medicalteam((team,T))). can_revoke(medicalmanager,medicalteam((team,T))). can_revoke(manager,employee). can_revoke(manager,medicalmanager). can_revoke(manager,receptionist). can_revoke(manager,nurse). can_revoke(manager,doctor). can_revoke(patient,agent((self,self))). can_revoke(patient((patient,N1)),agent((self,self))). can_revoke(patient,primarydoctor((self,self))). can_revoke(patient((patient,N1)),primarydoctor((self,self))). can_revoke(doctor((patient,P)),patient((patient,P))). can_revoke(receptionist,doctor((patient,P))). can_revoke(thirdparty((patient,P)),patientwithtpc((tpc,Self))). pa(doctor((patient,P)), oldmedicalrecords((patient,P)), View). pa(doctor((patient,P)), recentmedicalrecords((patient,P)), View). pa(doctor((patient,P)), privatenotes((patient,P)), View). pa(doctor((patient,P)), privatenotes((patient,P)), Add). pa(doctor((patient,P)), recentmedicalrecords((patient,P)), Add). pa(doctor((patient,P)), prescriptions((patient,P)), View). pa(doctor((patient,P)), prescriptions((patient,P)), Modify). pa(manager, patientpersonalinfo, Access). pa(manager, patientfinancialinfo, Access). pa(manager, patientmedicalinfo, Access). pa(manager, oldmedicalrecords, Enter). pa(manager, recentmedicalrecords, Enter). pa(manager, careplan, Update). pa(receptionist, appointment, Create). pa(nurse, oldmedicalrecords, Access). pa(nurse, careplan, View). pa(nurse, progressnotes, Add). pa(nurse, recentmedicalrecords, View). pa(patient, oldmedicalrecords((patient,Self)), View). pa(patient, recentmedicalrecords((patient,Self)), View). pa(patient, legalagreement((patient,Self)), Sign). pa(patient, prescriptions((patient,Self)), View). pa(patient, bills((patient,Self)), View). pa(patientwithtpc, medicalrecordswiththirdpartyinfo((patient,Self)), View). pa(patient((patient,N1)), oldmedicalrecords((patient,Self)), View). pa(patient((patient,N1)), recentmedicalrecords((patient,Self)), View). pa(patient((patient,N1)), legalagreement((patient,Self)), Sign). pa(patient((patient,N1)), prescriptions((patient,Self)), View). pa(patient((patient,N1)), bills((patient,Self)), View).