def examine_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "Physician", "IsPrescriptionNeeded");
         task.set_field('PrescriptionNumber', 1);
         self.workflow.add(task);
         copyFields =['FirstName','LastName','Birthday','InsuranceCompany','CoPay'];
         task = Task.construct_from_result(result, "Billing", "BillInsurance", copy=copyFields);
         self.workflow.add(task);
         self.workflow.update_status(result, Status.COMPLETE);
    def checks_information(self, results):

        for result in results:  # repeat the following actions for each result
            if result.data['IDfit'] == 1 :
                task = Task.construct_from_result(result, "printer", "givetix")
            else:
                task = Task.construct_from_result(result, "TSA", "frisk")
            self.workflow.add(task)
            self.workflow.update_status(result, Status.COMPLETE) 
 def is_prescription_needed_complete(self, results):
     for result in results:
         if result.data['IsPrescriptionNeeded'] == 1:
             #Add task to write the needed prescrption
             task = Task.construct_from_result(result, "Physician", "WritePrescription");
             self.workflow.add(task);
             #Add task to ask if we need another prescription
             task = Task.construct_from_result(result, "Physician", "IsPrescriptionNeeded");
             task.set_field('PrescriptionNumber',result.get_int_field('PrescriptionNumber')+1);
             task.remove_field('IsPrescriptionNeeded');
             self.workflow.add(task);
         self.workflow.update_status(result, Status.COMPLETE);
Пример #4
0
 def is_prescription_needed_complete(self, results):
     for result in results:
         if result.data['IsPrescriptionNeeded'] == 1:
             #Add task to write the needed prescrption
             task = Task.construct_from_result(result, "Physician",
                                               "WritePrescription")
             self.workflow.add(task)
             #Add task to ask if we need another prescription
             task = Task.construct_from_result(result, "Physician",
                                               "IsPrescriptionNeeded")
             task.set_field('PrescriptionNumber',
                            result.get_int_field('PrescriptionNumber') + 1)
             task.remove_field('IsPrescriptionNeeded')
             self.workflow.add(task)
         self.workflow.update_status(result, Status.COMPLETE)
Пример #5
0
 def examine_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "Physician",
                                           "IsPrescriptionNeeded")
         task.set_field('PrescriptionNumber', 1)
         self.workflow.add(task)
         copyFields = [
             'FirstName', 'LastName', 'Birthday', 'InsuranceCompany',
             'CoPay'
         ]
         task = Task.construct_from_result(result,
                                           "Billing",
                                           "BillInsurance",
                                           copy=copyFields)
         self.workflow.add(task)
         self.workflow.update_status(result, Status.COMPLETE)
Пример #6
0
 def car_order_taken(self, results):
     '''
     This method (i.e. function) gets called to update data and schedule any tasks
     necessary after a drink order is taken.  Specifically, this function
     will set the status to "complete" on the "take drink order" task
     and assigns the preparation of this drink to the LS.
     '''
     for result in results:  # repeat the following actions for each result
         # !!! Fix the line below...
         task = Task.construct_from_result(result, "Cashier", "CardReceipt")
         self.workflow.add(task)  # add the new task to the workflow
         self.workflow.update_status(result, Status.COMPLETE)
 def drink_order_taken(self, results):
     '''
     This method (i.e. function) gets called to update data and schedule any tasks
     necessary after a drink order is taken.  Specifically, this function
     will set the status to "complete" on the "take drink order" task
     and assigns the preparation of this drink to the Barista.
     '''
     for result in results:  # repeat the following actions for each result
         # !!! Fix the line below... 
         task = Task.construct_from_result(result, "Barista", "DrinkPrepared");
         self.workflow.add(task) # add the new task to the workflow
         self.workflow.update_status(result, Status.COMPLETE)
 def fill_prescription_complete(self, results):
     # Get the filled ones:
     filled = [result for result in results if result.stepname == "FillPrescription"];
     
     if len(filled) > 0:
         copyFields =['FirstName','LastName','Birthday'];
         appendFields = ['PrescriptionNumber', 'DrugName','GenericName','Refills'];
         addFields = ['TotalCharge'];
         task = Task.construct_from_results(filled, "Pharmacist", "DispensePrescription", copy=copyFields, append=appendFields, add_fields=addFields);
         self.workflow.add(task);
     for result in filled:
         self.workflow.update_status(result, Status.COMPLETE);
Пример #9
0
 def write_prescription_complete(self, results):
     for result in results:
         copyFields = [
             'FirstName', 'LastName', 'Birthday', 'DrugName', 'Dose',
             'Frequency', 'Refills', 'IsGenericAcceptable',
             'PrescriptionNumber'
         ]
         task = Task.construct_from_result(result,
                                           "Pharmacist",
                                           "FillPrescription",
                                           copy=copyFields)
         self.workflow.add(task)
         self.workflow.update_status(result, Status.COMPLETE)
 def car_payment(self, results):
     '''
     This method is called after the LS has prepared the drink.  
     In our very simple workflow this is the last step in the process, 
     which means that this method has a very simple job:  it just needs to mark 
     the status of the LS's task (stored in the results variable) as Complete.  
     '''
     #!!! Replace this pass, with appropriate code (using the car_order_taken) method
     
     for result in results:  # repeat the following actions for each result
         # !!! Fix the line below... 
         task = Task.construct_from_result(result, "LS", "ConfirmedRental");
         self.workflow.add(task) # add the new task to the workflow
         self.workflow.update_status(result, Status.COMPLETE)
Пример #11
0
    def car_payment(self, results):
        '''
        This method is called after the LS has prepared the drink.  
        In our very simple workflow this is the last step in the process, 
        which means that this method has a very simple job:  it just needs to mark 
        the status of the LS's task (stored in the results variable) as Complete.  
        '''
        #!!! Replace this pass, with appropriate code (using the car_order_taken) method

        for result in results:  # repeat the following actions for each result
            # !!! Fix the line below...
            task = Task.construct_from_result(result, "LS", "ConfirmedRental")
            self.workflow.add(task)  # add the new task to the workflow
            self.workflow.update_status(result, Status.COMPLETE)
Пример #12
0
    def fill_prescription_complete(self, results):
        # Get the filled ones:
        filled = [
            result for result in results
            if result.stepname == "FillPrescription"
        ]

        if len(filled) > 0:
            copyFields = ['FirstName', 'LastName', 'Birthday']
            appendFields = [
                'PrescriptionNumber', 'DrugName', 'GenericName', 'Refills'
            ]
            addFields = ['TotalCharge']
            task = Task.construct_from_results(filled,
                                               "Pharmacist",
                                               "DispensePrescription",
                                               copy=copyFields,
                                               append=appendFields,
                                               add_fields=addFields)
            self.workflow.add(task)
        for result in filled:
            self.workflow.update_status(result, Status.COMPLETE)
 def write_prescription_complete(self, results):
     for result in results:
         copyFields =['FirstName','LastName','Birthday','DrugName','Dose','Frequency','Refills','IsGenericAcceptable', 'PrescriptionNumber'];
         task = Task.construct_from_result(result, "Pharmacist", "FillPrescription", copy=copyFields);
         self.workflow.add(task);
         self.workflow.update_status(result, Status.COMPLETE);
Пример #14
0
 def patient_arrival_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "PhysicianAsst", "Admit")
         self.workflow.add(task)
         self.workflow.update_status(result, Status.COMPLETE)
Пример #15
0
 def admit_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "Physician", "Examine")
         self.workflow.add(task)
         self.workflow.update_status(result, Status.COMPLETE)
 def admit_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "Physician", "Examine");
         self.workflow.add(task);
         self.workflow.update_status(result, Status.COMPLETE);
 def patient_arrival_complete(self, results):
     for result in results:
         task = Task.construct_from_result(result, "PhysicianAsst", "Admit");
         self.workflow.add(task);
         self.workflow.update_status(result, Status.COMPLETE);
    def enter_information(self, results):

        for result in results:  # repeat the following actions for each result
            task = Task.construct_from_result(result,"checker", "checkID") 
            self.workflow.add(task) # add the new task to the workflow
            self.workflow.update_status(result, Status.COMPLETE)