Beispiel #1
0
def getPayCountByDiagnoseId(diagnoseId):
    if diagnoseId is None:
        return
    diagnose = Diagnose.getDiagnoseById(diagnoseId)
    if (
        diagnose
        and hasattr(diagnose, "pathology")
        and diagnose.pathology
        and hasattr(diagnose.pathology, "pathologyPostions")
        and diagnose.pathology.pathologyPostions
    ):
        diagnoseMethod = diagnose.pathology.diagnoseMethod
        count = len(diagnose.pathology.pathologyPostions)
        return Diagnose.getPayCount(diagnoseMethod, count, Diagnose.getUserDiscount(diagnose.patientId))
Beispiel #2
0
 def test_getDiagnoseCountByDoctorId(self):
     count=Diagnose.getDiagnoseCountByDoctorId(4,5)
     print count
Beispiel #3
0
 def test_getNewDiagnoseCountByUserId(self):
     count=Diagnose.getNewDiagnoseCountByUserId(5)
     print count
Beispiel #4
0
 def test_getDiagnoseByAdmin(self):
     haspitalList=[]
     haspitalList.append(1)
     haspitalList.append(3)
     diagnoses=Diagnose.getDiagnoseByAdmin(session,haspitalList,'任志强')
Beispiel #5
0
 def test_getById(self):
     diagnose=Diagnose.getDiagnoseById(1)
     print diagnose.id
Beispiel #6
0
 def test_getPatientListByDoctorId(self):
     patients=Diagnose.getPatientListByDoctorId(1)
     print len(patients)
Beispiel #7
0
 def test_getDiagnose(self):
     pager=Pagger(1,20)
     diagnoses=Diagnose.getDiagnosesByDoctorId(1,pager,None)
     print len(diagnoses)
Beispiel #8
0
    def test_addDiagnose(self):
        diagnose=Diagnose()
        diagnose.pathologyId=1
        diagnose.adminId=1

        diagnose.createDate=datetime.now()
        diagnose.doctorId=1
        diagnose.patientId=2
        diagnose.reportId=2
        diagnose.hospitalId=1
        diagnose.status=0
        Diagnose.save(diagnose)
Beispiel #9
0
 def test_getDiagnoseCountByDoctorId(self):
     count = Diagnose.getDiagnoseCountByDoctorId(4, 5)
     print count
Beispiel #10
0
 def test_getNewDiagnoseCountByUserId(self):
     count = Diagnose.getNewDiagnoseCountByUserId(5)
     print count
Beispiel #11
0
 def test_getDiagnoseByAdmin(self):
     haspitalList = []
     haspitalList.append(1)
     haspitalList.append(3)
     diagnoses = Diagnose.getDiagnoseByAdmin(session, haspitalList, '任志强')
Beispiel #12
0
 def test_getById(self):
     diagnose = Diagnose.getDiagnoseById(1)
     print diagnose.id
Beispiel #13
0
 def test_getPatientListByDoctorId(self):
     patients = Diagnose.getPatientListByDoctorId(1)
     print len(patients)
Beispiel #14
0
 def test_getDiagnose(self):
     pager = Pagger(1, 20)
     diagnoses = Diagnose.getDiagnosesByDoctorId(1, pager, None)
     print len(diagnoses)
Beispiel #15
0
    def test_addDiagnose(self):
        diagnose = Diagnose()
        diagnose.pathologyId = 1
        diagnose.adminId = 1

        diagnose.createDate = datetime.now()
        diagnose.doctorId = 1
        diagnose.patientId = 2
        diagnose.reportId = 2
        diagnose.hospitalId = 1
        diagnose.status = 0
        Diagnose.save(diagnose)