def createPostReport(self):
        self.getPostData(self.ui)
        post_report = PostReportPatientClass.PostReportPatient()
        post_report.setAnesthetic_complications_operationroom(self.post1_info)
        post_report.setAnesthetic_complications_admitroom(self.post2_info)
        post_report.setAnesthetic_complications_admitroom_2hrs(self.post3_info)
        post_report.setAnesthetic_complications_admitroom_24hrs(self.post4_info)
        post_report.setAnesthetic_complications_procedure(self.post5_info)
        post_report.setAnesthetic_complications_admitroom_48hrs(self.post6_info)
        post_report.setAnesthetic_complications_admitroom_7day(self.post7_info)

        return post_report
Esempio n. 2
0
 def save_post_info(self):
     self.getPostData(self.ui)
     post_report = PostReportPatientClass.PostReportPatient()
     post_report.setAnesthetic_complications_operationroom(self.post1_info)
     post_report.setAnesthetic_complications_admitroom(self.post2_info)
     post_report.setAnesthetic_complications_admitroom_2hrs(self.post3_info)
     post_report.setAnesthetic_complications_admitroom_24hrs(
         self.post4_info)
     post_report.setAnesthetic_complications_procedure(self.post5_info)
     post_report.setAnesthetic_complications_admitroom_48hrs(
         self.post6_info)
     post_report.setAnesthetic_complications_admitroom_7day(self.post7_info)
     print("in post")
     self.close()
 def save_post_info (self):
     self.getPostData(self.ui)
     post_report = PostReportPatientClass.PostReportPatient()
     post_report.setAnesthetic_complications_operationroom(self.post1_info)
     post_report.setAnesthetic_complications_admitroom(self.post2_info)
     post_report.setAnesthetic_complications_admitroom_2hrs(self.post3_info)
     post_report.setAnesthetic_complications_admitroom_24hrs(self.post4_info)
     post_report.setAnesthetic_complications_procedure(self.post5_info)
     post_report.setAnesthetic_complications_admitroom_48hrs(self.post6_info)
     post_report.setAnesthetic_complications_admitroom_7day(self.post7_info)
     if self.b_post_save.text() == "save":
         self.patient.updateStatus(s.PatientStatus.done)
         self.callDialogSave()
     elif self.b_post_save.text() == "update":
         self.callDialogUpdate()
     else:
         raise TypeError
     self.patient.addIntraReport(post_report)
     self.parent.updatePatient(self.patient)
     self.close()
Esempio n. 4
0
def demo_3REPORT():
    from Appointment import AppointmentClass
    from Patient import PatientClass
    db_appointment = ControllerDatabase('appointmentObject.pkl')
    db_patients = ControllerDatabase('patientObject.pkl')
    pre_pre_report = [[
        "OPD", "0001", "PIC", "Atichat Lappanopakon", 20, "0971249197", "10001"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p1 = PatientClass.Patient(pre_pre_report)
    pre_pre_report = [[
        "IPD", "0002", "PIC", "David Jason", 10, "0871249197", "10002"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p2 = PatientClass.Patient(pre_pre_report)
    pre_pre_report = [[
        "OPD", "0003", "PIC", "Sara MJ", 40, "0271249197", "10003"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p3 = PatientClass.Patient(pre_pre_report)
    db_patients.updateObject([p1, p2, p3])
    doctor = Doctor('D001', 'doc1', '1234', 'Dr.A', 'Charnchyyy', '00000',
                    'Sri tanya')
    s1 = AppointmentClass.Appointment(
        '10001', ["Elective case", "28/5/2017", "Morning"], doctor, p1)
    s2 = AppointmentClass.Appointment(
        '10002', ["Emergency case", "28/5/2017", "Afternoon"], doctor, p2)
    s3 = AppointmentClass.Appointment('10003',
                                      ["Ergency case", "28/5/2017", "None"],
                                      doctor, p3)
    db_appointment.updateObject([s1, s2, s3])

    preReport1 = PreReportPatientClass.PreReportByNurse(
        'atenolol 5 mg tab O at 6.00', '-', '-', '-', '-', 'Yes', '001', 'In',
        'I', '2', '5', '130/80', '86', '20', '36', 'E', 'Yes', 'Yes', 'Yes',
        ['Med1', 'sym1', 'Med2', 'sym2', 'Med3', 'sym3'])

    preReport2 = PreReportPatientClass.PreReportByNurse(
        'atenolol 5 mg tab O at 6.00', '-', '-', '-', '-', 'Yes', '001', 'In',
        'I', '2', '5', '130/80', '86', '20', '36', 'E', 'Yes', 'Yes', 'No',
        ['-', '-', '-', '-', '-', '-'])

    intraReport = IntraReportPatientClass.IntraReportPatient(
        '1234', '01/06/2017', '0001', '101', 'A', 'ICUS', 'ICUS',
        ['Janet van Dyne', 'Wanda Maximoff'], 'post diagnose', 'operation',
        'Major', 'Anes', 'Clinton Francis Barton', 'note',
        'Pre anesthesia visit at ward', 'Official', 'I', '1', '1', '1', '-',
        '-', 'Oral  Endotrachel Tracheal', '8:30', '9:00', '30', '-', [
            'Janet van Dyne', 'Wanda Maximoff', 'Natasha Alianovna Romanoff',
            'Carol Danvers', 'Jennifer Walters'
        ])

    intraReport2 = IntraReportPatientClass.IntraReportPatient(
        '1111', '02/06/2017', '0002', '102', 'A', 'ICUS', 'ICUS',
        ['Janet van Dyne', 'Wanda Maximoff'], 'post diagnose', 'operation',
        'Major', 'Anes', 'Clinton Francis Barton', 'note',
        'Pre anesthesia visit at ward', 'Official', 'I', '1', '1', '1', '-',
        '-', 'Oral  Endotrachel Tracheal', '8:30', '9:00', '30', '-', [
            'Janet van Dyne', 'Wanda Maximoff', 'Natasha Alianovna Romanoff',
            'Carol Danvers', 'Jennifer Walters'
        ])

    post_report1 = [
        'Anes. Personal hazard', 'Awareness', 'Cardiac arrest', 'Note',
        'Jacques Duquesne', 'Procedure', '6/5/2017'
    ]
    post_report2 = [
        'CVA', 'Awareness', 'Diffcult intubation', 'Note', 'Jacques Duquesne',
        'Procedure', '7/5/2017'
    ]

    post_report = PostReportPatientClass.PostReportPatient()
    post_report.setAnesthetic_complications_operationroom(post_report1)
    post_report.setAnesthetic_complications_admitroom(post_report1)
    post_report.setAnesthetic_complications_admitroom_2hrs(post_report1)
    post_report.setAnesthetic_complications_admitroom_24hrs(post_report2)
    post_report.setAnesthetic_complications_procedure(post_report2)
    post_report.setAnesthetic_complications_admitroom_48hrs(post_report2)
    post_report.setAnesthetic_complications_admitroom_7day(post_report2)

    p1.addPreReportNurse(preReport1)
    p1.addIntraReport(intraReport)
    p1.addPostReport(post_report)
    print(type(preReport1))
    print(type(intraReport))
    print(type(post_report))

    import sys
    app = QApplication(sys.argv)
    #from Employee.Doctor.GuiClass import Dialog_3ReportPatientClass as R
    # win = R.ReportPatient()
    # pre_data, pre_databox = p1.getPreInfo()
    # intra_data, intra_databox = p1.getIntraInfo()
    # post_data = p1.getPostInfo()
    # win.setDataFromDataBasePre(pre_data, pre_databox)
    # win.setDataFromDataBaseIntra(intra_data, intra_databox)
    # win.setDataFromDataBasePost(post_data)
    """THIS HERE"""
    from Patient import Dialog_HistoryReport as h
    win = h.HistoryReport(preReport1, intraReport, post_report)
    win.show()
    win.exec_()
    sys.exit(app.exec_())
Esempio n. 5
0
def demo_patient():
    from Appointment import AppointmentClass
    from Patient import PatientClass
    db_appointment = ControllerDatabase('appointmentObject.pkl')
    db_patients = ControllerDatabase('patientObject.pkl')
    pre_pre_report = [[
        "OPD", "0001", "PIC", "Atichat Lappanopakon", 20, "0971249197", "10001"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p1 = PatientClass.Patient(pre_pre_report)
    pre_pre_report = [[
        "IPD", "0002", "PIC", "David Jason", 10, "0871249197", "10002"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p2 = PatientClass.Patient(pre_pre_report)
    pre_pre_report = [[
        "OPD", "0003", "PIC", "Sara MJ", 40, "0271249197", "10003"
    ], ["Pre_OD", "Plan", "Underlying", "Treatment", "Note"]]
    p3 = PatientClass.Patient(pre_pre_report)
    """update status"""
    p1.updateStatus(s.PatientStatus.waitingPreReport)
    p2.updateStatus(s.PatientStatus.waitingPreReport)
    p3.updateStatus(s.PatientStatus.waitingPreReport)

    db_patients.updateObject([p1, p2, p3])
    doctor = Doctor('D001', 'doc1', '1234', 'Dr.A', 'Charnchyyy', '00000',
                    'Sri tanya')
    s1 = AppointmentClass.Appointment(
        '10001', ["Elective case", "28/5/2017", "Morning"], doctor, p1)
    s2 = AppointmentClass.Appointment(
        '10002', ["Emergency case", "28/5/2017", "Afternoon"], doctor, p2)
    s3 = AppointmentClass.Appointment('10003',
                                      ["Ergency case", "28/5/2017", "None"],
                                      doctor, p3)
    print(s3.patient.AN)
    print(p3.AN)
    db_appointment.updateObject([s1, s2, s3])

    preReport1 = PreReportPatientClass.PreReportByNurse(
        'atenolol 5 mg tab O at 6.00', '-', '-', '-', '-', 'Yes', '001', 'In',
        'I', '2', '5', '130/80', '86', '20', '36', 'E', 'Yes', 'Yes', 'Yes',
        ['Med1', 'sym1', 'Med2', 'sym2', 'Med3', 'sym3'])

    preReport2 = PreReportPatientClass.PreReportByNurse(
        'atenolol 5 mg tab O at 6.00', '-', '-', '-', '-', 'Yes', '001', 'In',
        'I', '2', '5', '130/80', '86', '20', '36', 'E', 'Yes', 'Yes', 'No',
        ['-', '-', '-', '-', '-', '-'])

    intraReport = IntraReportPatientClass.IntraReportPatient(
        '1234', '01/06/2017', '0001', '101', 'A', 'ICUS', 'ICUS',
        ['Janet van Dyne', 'Wanda Maximoff'], 'post diagnose', 'operation',
        'Major', 'Anes', 'Clinton Francis Barton', 'note',
        'Pre anesthesia visit at ward', 'Official', 'I', '1', '1', '1', '-',
        '-', 'Oral  Endotrachel Tracheal', '8:30', '9:00', '30', '-', [
            'Janet van Dyne', 'Wanda Maximoff', 'Natasha Alianovna Romanoff',
            'Carol Danvers', 'Jennifer Walters'
        ])

    intraReport2 = IntraReportPatientClass.IntraReportPatient(
        '1111', '02/06/2017', '0002', '102', 'A', 'ICUS', 'ICUS',
        ['Janet van Dyne', 'Wanda Maximoff'], 'post diagnose', 'operation',
        'Major', 'Anes', 'Clinton Francis Barton', 'note',
        'Pre anesthesia visit at ward', 'Official', 'I', '1', '1', '1', '-',
        '-', 'Oral  Endotrachel Tracheal', '8:30', '9:00', '30', '-', [
            'Janet van Dyne', 'Wanda Maximoff', 'Natasha Alianovna Romanoff',
            'Carol Danvers', 'Jennifer Walters'
        ])

    post_report1 = [
        'Anes. Personal hazard', 'Awareness', 'Cardiac arrest', 'Note',
        'Jacques Duquesne', 'Procedure', '6/5/2017'
    ]
    post_report2 = [
        'CVA', 'Awareness', 'Diffcult intubation', 'Note', 'Jacques Duquesne',
        'Procedure', '7/5/2017'
    ]

    post_report = PostReportPatientClass.PostReportPatient()
    post_report.setAnesthetic_complications_operationroom(post_report1)
    post_report.setAnesthetic_complications_admitroom(post_report1)
    post_report.setAnesthetic_complications_admitroom_2hrs(post_report1)
    post_report.setAnesthetic_complications_admitroom_24hrs(post_report2)
    post_report.setAnesthetic_complications_procedure(post_report2)
    post_report.setAnesthetic_complications_admitroom_48hrs(post_report2)
    post_report.setAnesthetic_complications_admitroom_7day(post_report2)
    """update status"""
    p2.addPreReportNurse(preReport1)
    p2.updateStatus(s.PatientStatus.waitingIntraReport)
    p3.addPreReportNurse(preReport2)
    p3.updateStatus(s.PatientStatus.waitingIntraReport)

    p3.addPostReport(post_report)
    p3.updateStatus(s.PatientStatus.waitingPostReport)
    db_patients.updateObject([p1, p2, p3])