示例#1
0
 private bool CheckEyeDoctor(int tpr_id, int?mrd_id, bool eye_dropper, List <inx_sp_get_patient_roomResult> patientRoom, ref int?next_mrm_id, ref int?next_mvt_id)
 {
     try
     {
         if (mrd_id == null)
         {
             return(false);
         }
         else
         {
             using (InhCheckupDataContext cdc = new InhCheckupDataContext())
             {
                 mst_room_dtl roomDtl = cdc.mst_room_dtls.Where(x => x.mrd_id == mrd_id).FirstOrDefault();
                 if (roomDtl.mst_room_hdr.mrm_code == "EM")
                 {
                     if (roomDtl.mrd_type == 'D')
                     {
                         return(false);
                     }
                     else
                     {
                         sp_get_patient_roomResult patientRoomEye = patientRoom.Where(x => x.mvt_code == "EM").FirstOrDefault();
                         if (patientRoomEye == null)
                         {
                             return(false);
                         }
                         else
                         {
                             if (eye_dropper == true)
                             {
                                 return(false);
                             }
                             else
                             {
                                 next_mrm_id = patientRoomEye.mrm_id;
                                 next_mvt_id = patientRoomEye.mvt_id;
                                 return(true);
                             }
                         }
                     }
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         globalCls.MessageError("get_lab_result.Class.SendAutoCls", "CheckEyeDoctor(int mrm_id)", ex.Message);
         return(false);
     }
 }
示例#2
0
 private bool CheckPE(int tpr_id, string doctor_code, List <inx_sp_get_patient_roomResult> patientRoom, DateTime dateNow, ref int?next_mrm_id, ref int?next_mvt_id)
 {
     try
     {
         sp_get_patient_roomResult patientRoomDoctor = patientRoom.Where(x => x.mvt_code == "PE").FirstOrDefault();
         if (patientRoomDoctor == null)
         {
             return(false);
         }
         else
         {
             if (doctor_code == "" || doctor_code == null)
             {
                 if (patientRoomDoctor.waiting_person != 0)
                 {
                     return(false);
                 }
                 else
                 {
                     next_mrm_id = patientRoomDoctor.mrm_id;
                     next_mvt_id = patientRoomDoctor.mvt_id;
                     return(true);
                 }
             }
             else
             {
                 if (patientRoomDoctor.login_flag != "Y")
                 {
                     return(false);
                 }
                 else
                 {
                     if (patientRoomDoctor.count_doctor_ns > 0 || patientRoomDoctor.count_doctor_wk > 0)
                     {
                         return(false);
                     }
                     else
                     {
                         next_mrm_id = patientRoomDoctor.mrm_id;
                         next_mvt_id = patientRoomDoctor.mvt_id;
                         return(true);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         globalCls.MessageError("get_lab_result.Class.SendAutoCls", "CheckEyeDoctor(int mrm_id)", ex.Message);
         return(false);
     }
 }