123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using Newtonsoft.Json.Linq;
- using PTMedicalInsurance.Common;
- using PTMedicalInsurance.Forms;
- using PTMedicalInsurance.Helper;
- using PTMedicalInsurance.Variables;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace PTMedicalInsurance.Business
- {
- class OtherQueryProcess : AbstractProcess
- {
- TradeEnum trade;
- /// <summary>
- /// 构造函数
- /// </summary>
- /// <param name="trade">交易</param>
- public OtherQueryProcess(TradeEnum trade)
- {
- this.trade = trade;
- }
- public override CallResult Process(JObject input)
- {
- this.OrginalInput = input;
- switch (this.trade)
- {
- case TradeEnum.HistoryPrescriptionQuery:
- QueryPatientPrescription();
- break;
- default:
- break;
- }
- return Success();
- }
- private void QueryPatientPrescription()
- {
- dynamic input = new JObject();
- input.psn_name = Global.pat.name;
- input.certno = Global.pat.certNO ;
- string errMsg = "";
- try
- {
- JObject joRtn = invoker.invokeCenterService(trade, input);
- if (JsonHelper.parseCenterRtnValue(joRtn, out errMsg) != 0)
- {
- Global.writeLog("QueryPatientPrescription", input.ToString(), errMsg);
- return;
- }
- JArray list = JArray.Parse(joRtn["mdtrtinfo"].Text());
- if (list?.Count > 0)
- {
- PrescriptionForm form = new PrescriptionForm();
- form.initList(list);
- form.ShowDialog();
- }
- }
- catch (Exception ex)
- {
- Global.writeLog("QueryPatientPrescription",input.ToString(),ex.Message);
- }
- }
- }
- }
|