Exemplo n.º 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))
Exemplo n.º 2
0
 def test_getDiagnoseCountByDoctorId(self):
     count=Diagnose.getDiagnoseCountByDoctorId(4,5)
     print count
Exemplo n.º 3
0
 def test_getNewDiagnoseCountByUserId(self):
     count=Diagnose.getNewDiagnoseCountByUserId(5)
     print count
Exemplo n.º 4
0
 def test_getDiagnoseByAdmin(self):
     haspitalList=[]
     haspitalList.append(1)
     haspitalList.append(3)
     diagnoses=Diagnose.getDiagnoseByAdmin(session,haspitalList,'任志强')
Exemplo n.º 5
0
 def test_getById(self):
     diagnose=Diagnose.getDiagnoseById(1)
     print diagnose.id
Exemplo n.º 6
0
 def test_getPatientListByDoctorId(self):
     patients=Diagnose.getPatientListByDoctorId(1)
     print len(patients)
Exemplo n.º 7
0
 def test_getDiagnose(self):
     pager=Pagger(1,20)
     diagnoses=Diagnose.getDiagnosesByDoctorId(1,pager,None)
     print len(diagnoses)
Exemplo n.º 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)
Exemplo n.º 9
0
 def test_getDiagnoseCountByDoctorId(self):
     count = Diagnose.getDiagnoseCountByDoctorId(4, 5)
     print count
Exemplo n.º 10
0
 def test_getNewDiagnoseCountByUserId(self):
     count = Diagnose.getNewDiagnoseCountByUserId(5)
     print count
Exemplo n.º 11
0
 def test_getDiagnoseByAdmin(self):
     haspitalList = []
     haspitalList.append(1)
     haspitalList.append(3)
     diagnoses = Diagnose.getDiagnoseByAdmin(session, haspitalList, '任志强')
Exemplo n.º 12
0
 def test_getById(self):
     diagnose = Diagnose.getDiagnoseById(1)
     print diagnose.id
Exemplo n.º 13
0
 def test_getPatientListByDoctorId(self):
     patients = Diagnose.getPatientListByDoctorId(1)
     print len(patients)
Exemplo n.º 14
0
 def test_getDiagnose(self):
     pager = Pagger(1, 20)
     diagnoses = Diagnose.getDiagnosesByDoctorId(1, pager, None)
     print len(diagnoses)
Exemplo n.º 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)