123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using HNWD.Pregrant.Model;
- using HNWD.Pregrant.Common;
- using System.Text;
- using HNWD.Pregrant.DataAccess;
- using HNWD.Pregrant.WebService;
- namespace HNWD.Pregrant.WebService.WDHS_I
- {
- /// <summary>
- /// 获取客户个人信息数据
- /// </summary>
- public partial class callingMainNurse_patientinfo : PageBase
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string bedId = this.GetValueByKey("bedId");
- if(string.IsNullOrEmpty(bedId))
- {
- this.ResponseDefaultError();
- return;
- }
- if (!this.InitializeDataAccess())
- {
- this.ResponseDefaultError(PromptingMessage.Error_Data_Initialized);
- return;
- }
-
- WD_DeviceInfo wd_DeviceInfo = wd_DeviceInfoDataAccess.ext.messageDataList.Find(f => f.DEVICE_TYPE == "4" && f.ID == bedId);
- if (wd_DeviceInfo == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_DeviceInfo);
- return;
- }
- WD_PatientInfo wd_PatientInfo = wd_PatientInfoDataAccess.ext.messageDataList.Find(f => f.ID == wd_DeviceInfo.DEVICE_HUMAN_ID);
- if (wd_PatientInfo == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_PatientInfo);
- return;
- }
- wd_DeviceInfo.bedId = bedId;
- wd_DeviceInfo.bedNum = wd_DeviceInfo.DEVICE_ROOM_NUM;
- //wd_DeviceInfo.trusteeshipState = wd_DeviceInfo.DEVICE_SIP_HOSTING_ID.Contains("#") ? "1" : "0";
- wd_DeviceInfo.PatientID = wd_DeviceInfo.DEVICE_HUMAN_ID;
-
-
- wd_DeviceInfo.patientName = wd_PatientInfo.PATIENT_NAME;
- wd_DeviceInfo.PatientAge = wd_PatientInfo.PATIENT_AGE + wd_PatientInfo.PATIENT_AGE_UNIT;
- wd_DeviceInfo.patientGender = wd_PatientInfo.PATIENT_SEX;
- wd_DeviceInfo.admissionTime = wd_PatientInfo.PATIENT_INDATE;
- wd_DeviceInfo.babyName = wd_PatientInfo.PATIENT_BABYNAME;
- wd_DeviceInfo.babySex = wd_PatientInfo.PATIENT_BABYSEX;
- wd_DeviceInfo.name = wd_PatientInfo.PATIENT_NAME;
- wd_DeviceInfo.avoidCertainFood = wd_PatientInfo.PATIENT_ILLNESS;
- List<WD_UrgeInfo> listUrgeInfo = wd_UrgeInfoDataAccess.ext.messageDataList.FindAll(f => f.URGE_PATIENT_ID == wd_DeviceInfo.DEVICE_HUMAN_ID);
- if (listUrgeInfo == null || listUrgeInfo.Count == 0)
- {
- }
- else
- {
- listUrgeInfo.ForEach(f => wd_DeviceInfo.carefulMatter.Add(new CarefulMatter() { item = f.URGE_VALUE }));
- }
- wd_DeviceInfo.roomByname = wd_DeviceInfo.DEVICE_NAME;
-
- WD_StaffInfo wd_StaffInfoDoc = wd_StaffInfoDataAccess.ext.messageDataList.Find(f => f.ID == wd_PatientInfo.PATIENT_DOCTOR_ID);
- if (wd_StaffInfoDoc == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_StaffInfo);
- return;
- }
- else
- {
- wd_DeviceInfo.attendingDoctor = wd_StaffInfoDoc.STAFF_NAME;
-
- }
- WD_StaffInfo wd_StaffInfoNurse = wd_StaffInfoDataAccess.ext.messageDataList.Find(f => f.ID == wd_PatientInfo.PATIENT_NURSE_ID);
- if (wd_StaffInfoNurse == null)
- {
- this.ResponseDefaultError(PromptingMessage.Error_StaffInfo);
- return;
- }
- else
- {
- wd_DeviceInfo.nurseInCharge = wd_StaffInfoNurse.STAFF_NAME;
- }
- wd_DeviceInfo.Condition = wd_PatientInfo.PATIENT_ILLNESS;
-
- //////////////////////////////////
- Response.Write(JsonHelper.SerializeWithSuffix(wd_DeviceInfo));
- WD_SysLogInfo wd_SysLogInfo = new WD_SysLogInfo();
- wd_SysLogInfo.LOG_TYPE = "3";
- wd_SysLogInfo.LOG_SOURCE ="主机";
- wd_SysLogInfo.LOG_CONTENT ="下载了分机的设备数据";
- this.DataBaseLog(wd_SysLogInfo);
-
- }
- }
- }
|