/// <summary> /// 住院病人费用上传 /// </summary> /// <param name="hashtable"></param> /// <returns></returns> public bool UploadzyPatFee(System.Collections.Hashtable hashtable) { FeeDetail[] prescriptions = (FeeDetail[])hashtable["FeeDetail"]; ZY_PresOrder zypo = new ZY_PresOrder(); int[] presID = new int[prescriptions.Length]; for (int i = 0; i < prescriptions.Length; i++) { presID[i] = Convert.ToInt32(prescriptions[i].item_sn); } zypo.UpdateComp(presID);//更新为上传标识 BudgetFee hisData = new BudgetFee(); JoinArea joinArea = new JoinArea(); joinArea.code = JOIN_AREA_CODE; joinArea.name = JOIN_AREA_NAME; DataType dataType = new DataType(); dataType.dataTypeName = "住院数据"; dataType.dataTypeValue = "2"; ZyPatBaseData zyPat = new ZyPatBaseData(); zyPat.idCard = zyPatlist.patientInfo.PatNumber;//? zyPat.person_code = zyPatlist.patientInfo.PatCode; zyPat.hisID = zyPatlist.Nccm_NO; zyPat.area_id = JOIN_AREA_CODE; zyPat.medorg_code = MED_ORG_CODE;//? hisData.zyPat = zyPat; hisData.feeDetail = prescriptions; hisData.uploadorg = MED_ORG_CODE;//"40086695143010101A2201";//? hisData.dataType = dataType; hisData.joinArea = joinArea; RecieveDetailFeeResult result = NccmInterfaces.UploadZYPatFee(hisData); if (result.resultId) { prescriptions = result.feeDetail; presID = new int[prescriptions.Length]; for (int i = 0; i < prescriptions.Length; i++) { presID[i] = Convert.ToInt32(prescriptions[i].item_sn); } zypo.DelComp(presID);//更新上传失败的项目 return(true); } else { throw new Exception("农合接口调用失败:" + result.resultString); } }
/// <summary> /// 出院结算 /// </summary> /// <param name="hashtable"></param> /// <returns></returns> public object Charge(System.Collections.Hashtable hashtable) { FeeDetail[] prescriptions = (FeeDetail[])hashtable["FeeDetail"]; string Is_midWay = hashtable["midWay"].ToString(); string Nccm_NO = hashtable["Nccm_NO"].ToString(); ZY_PresOrder zypo = new ZY_PresOrder(); int[] presID = new int[prescriptions.Length]; for (int i = 0; i < prescriptions.Length; i++) { presID[i] = Convert.ToInt32(prescriptions[i].item_sn); } zypo.UpdateComp(presID);//更新为上传标识 PatientComp patComp = new PatientComp(); patComp.uploadorg = "1"; DataClass dataClass = new DataClass(); dataClass.dataClassValue = "2";//门诊是1,住院是2 patComp.dataClass = dataClass; JoinArea joinArea = new JoinArea(); joinArea.code = JOIN_AREA_CODE; joinArea.name = JOIN_AREA_NAME; patComp.joinArea = joinArea; DataType dataType = new DataType(); dataType.dataTypeName = "门诊数据"; dataType.dataTypeValue = "2"; patComp.dataType = dataType; ZyPatBaseData zyPat = new ZyPatBaseData(); zyPat.area_id = JOIN_AREA_CODE; zyPat.medorg_code = MED_ORG_CODE; zyPat.hisID = zyPatlist.Nccm_NO;//zyPatlist.CureNo + zyPatlist.PatListID.ToString(); zyPat.his_billno = Nccm_NO; zyPat.person_code = zyPatlist.patientInfo.PatCode; zyPat.name = zyPatlist.patientInfo.PatName; zyPat.sex = zyPatlist.patientInfo.PatSex == "男" ? "1" : "2"; zyPat.idCard = zyPatlist.patientInfo.PatNumber; zyPat.family_code = zyPatlist.patientInfo.FamilyCode; zyPat.medcard_id = zyPatlist.patientInfo.MediCard; zyPat.medorg_level = ((HospitalInfo)hospitalInfo).hos_level; zyPat.is_midway = Is_midWay; //1,中途2出院 zyPat.visit_type = "2"; zyPat.comp_classs = "2"; //? zyPat.adm_date = zyPatlist.CureDate.ToString(); //入院日期 zyPat.status = zyPatlist.CureState; //? zyPat.maindiag_code = zyPatlist.DiseaseCode; zyPat.dis_date = zyPatlist.OutDate.ToString(); patComp.zyPat = zyPat; patComp.zyDetail = prescriptions; patComp.uploadorg = MED_ORG_CODE; CompResult CR = NccmInterfaces.OutZYPatientCharge(patComp); if (CR.resultId) { prescriptions = CR.feeDetail; presID = new int[prescriptions.Length]; for (int i = 0; i < prescriptions.Length; i++) { presID[i] = Convert.ToInt32(prescriptions[i].item_sn); } zypo.DelComp(presID);//更新上传失败的项目 return(Convert.ToDecimal(CR.compData[0].comp_money)); } else { throw new Exception("农合接口调用失败:" + CR.resultString); } }