From 7c5e81c1af78360fc3c9247e769cf93bb1a08e39 Mon Sep 17 00:00:00 2001
From: falcon <9504402@qq.com>
Date: Fri, 1 Mar 2019 14:52:25 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5EF=E7=AE=A1=E7=90=86=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E5=BA=93=E3=80=82=E5=AE=9A=E4=B9=89=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93=E6=A8=A1=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
WebSiteCode/Cmdjy/Cmdjy/Cmdjy.csproj | 11 ++
.../Cmdjy/Cmdjy/Controllers/TestController.cs | 16 ++
WebSiteCode/Cmdjy/Cmdjy/Dal/DjyDbContext.cs | 33 ++++
.../Cmdjy/Cmdjy/Dal/Tables/HisDrugInfo.cs | 70 +++++++
.../Cmdjy/Dal/Tables/HisPrescriptionInfo.cs | 171 ++++++++++++++++++
WebSiteCode/Cmdjy/Cmdjy/Web.config | 23 ++-
WebSiteCode/Cmdjy/Cmdjy/packages.config | 1 +
7 files changed, 323 insertions(+), 2 deletions(-)
create mode 100644 WebSiteCode/Cmdjy/Cmdjy/Controllers/TestController.cs
create mode 100644 WebSiteCode/Cmdjy/Cmdjy/Dal/DjyDbContext.cs
create mode 100644 WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisDrugInfo.cs
create mode 100644 WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisPrescriptionInfo.cs
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Cmdjy.csproj b/WebSiteCode/Cmdjy/Cmdjy/Cmdjy.csproj
index 81ff545..89d6643 100644
--- a/WebSiteCode/Cmdjy/Cmdjy/Cmdjy.csproj
+++ b/WebSiteCode/Cmdjy/Cmdjy/Cmdjy.csproj
@@ -45,6 +45,12 @@
4
+
+ ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll
+
+
+ ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll
+
..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
@@ -148,6 +154,10 @@
+
+
+
+
Global.asax
@@ -202,6 +212,7 @@
+
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Controllers/TestController.cs b/WebSiteCode/Cmdjy/Cmdjy/Controllers/TestController.cs
new file mode 100644
index 0000000..440c3e8
--- /dev/null
+++ b/WebSiteCode/Cmdjy/Cmdjy/Controllers/TestController.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace Cmdjy.Controllers
+{
+ public class TestController:Controller
+ {
+ // GET: Test
+ public ActionResult Index(string msg) {
+ return Json(new { msg },JsonRequestBehavior.AllowGet);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Dal/DjyDbContext.cs b/WebSiteCode/Cmdjy/Cmdjy/Dal/DjyDbContext.cs
new file mode 100644
index 0000000..7bec3ac
--- /dev/null
+++ b/WebSiteCode/Cmdjy/Cmdjy/Dal/DjyDbContext.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Data.Entity;
+using Cmdjy.Dal.Tables;
+
+namespace Cmdjy.Dal
+{
+ ///
+ /// 崇明代煎药数据库
+ ///
+ public partial class DjyDbContext:DbContext
+ {
+ public DjyDbContext() : base("DjyDbContext") {
+ Database.SetInitializer(null);
+ }
+ }
+ ///
+ /// 数据表定义
+ ///
+ public partial class DjyDbContext
+ {
+ ///
+ /// 处方信息
+ ///
+ public DbSet PrescriptionInfos { get; set; }
+ ///
+ /// 药品信息
+ ///
+ public DbSet DrugInfos { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisDrugInfo.cs b/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisDrugInfo.cs
new file mode 100644
index 0000000..3b8932b
--- /dev/null
+++ b/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisDrugInfo.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Web;
+
+namespace Cmdjy.Dal.Tables
+{
+ ///
+ /// HIS发送的药品信息
+ ///
+ [Table("HisPrescriptionInfo")]
+ public class HisDrugInfo
+ {
+ ///
+ /// 主键,药品流水号
+ ///
+ [Key]
+ public int Id { get; set; }
+ ///
+ /// 记录创建时间
+ ///
+ public DateTime CreateDatetime { get; set; }
+ ///
+ /// 处方流水号
+ ///
+ public int PrescriptionId { get; set; }
+ ///
+ /// 发送请求的原始IP地址
+ ///
+ public string RawAddress { get; set; }
+ ///
+ /// "药品医保代码":"YP0306401000650",
+ ///
+ public string DrugNo { get; set; }
+ ///
+ /// 药品单价 0.085
+ ///
+ public string Price { get; set; }
+ ///
+ /// 单贴数量
+ ///
+ public string Count { get; set; }
+ ///
+ /// 单位 克
+ ///
+ public string Unit { get; set; }
+ ///
+ /// 单项总价
+ ///
+ public string Sum { get; set; }
+ ///
+ /// 规格 15.00000000
+ ///
+ public string DrugType { get; set; }
+ ///
+ /// 药品编码
+ ///
+ public string DrugLocalNo { get; set; }
+ ///
+ /// 药品名称
+ ///
+ public string DrugName { get; set; }
+ ///
+ /// 特殊要求
+ ///
+ public string Remark { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisPrescriptionInfo.cs b/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisPrescriptionInfo.cs
new file mode 100644
index 0000000..e445206
--- /dev/null
+++ b/WebSiteCode/Cmdjy/Cmdjy/Dal/Tables/HisPrescriptionInfo.cs
@@ -0,0 +1,171 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Cmdjy.Dal.Tables
+{
+ ///
+ /// HIS发送的处方信息
+ ///
+ [Table("HisPrescriptionInfo")]
+ public class HisPrescriptionInfo
+ {
+ ///
+ /// 主键,处方流水号
+ ///
+ [Key]
+ public int Id { get; set; }
+ ///
+ /// 记录创建时间
+ ///
+ public DateTime CreateDatetime { get; set; }
+ ///
+ /// 发送请求的原始IP地址
+ ///
+ public string RawAddress { get; set; }
+ ///
+ /// 处方类型
+ ///
+ public PrescriptionType Type { get; set; }
+ ///
+ /// 如果为退方,这里传要退的处方流水号。此编号在下单应答消息中提供
+ ///
+ public string RawRecordId { get; set; }
+ ///
+ /// 药品明细数量
+ ///
+ public string DrugCount { get; set; }
+ ///
+ /// 处方备注
+ ///
+ public string Remark { get; set; }
+ ///
+ /// 带回病房 否
+ ///
+ public string TakeBack { get; set; }
+ ///
+ /// "操作类型": "煎药自取", or "操作类型": "煎药快递", or "操作类型": "配药快递"
+ ///
+ public string OpType { get; set; }
+ ///
+ /// 操作员
+ ///
+ public string OpUser { get; set; }
+ ///
+ /// 病区
+ ///
+ public string Area { get; set; }
+ ///
+ /// 病床号
+ ///
+ public string Bed { get; set; }
+ ///
+ /// 操作时间
+ ///
+ public string OpDatatime { get; set; }
+ ///
+ /// 处方号
+ ///
+ public string PrescriptionNo { get; set; }
+ ///
+ /// 处方日期
+ ///
+ public string PrescriptionDatatime { get; set; }
+ ///
+ /// 单位编号 医疗机构编号
+ ///
+ public string HosNo { get; set; }
+ ///
+ /// 医疗机构名称
+ ///
+ public string HosName { get; set; }
+ ///
+ /// 发票号
+ ///
+ public string InvoiceNo { get; set; }
+ ///
+ /// 病人编号
+ ///
+ public string PatientNo { get; set; }
+ ///
+ /// 病人卡号
+ ///
+ public string CardNo { get; set; }
+ ///
+ /// 科室名称
+ ///
+ public string DepName { get; set; }
+ ///
+ /// 病人年龄
+ ///
+ public string PatientAge { get; set; }
+ ///
+ /// 病人生日
+ ///
+ public string PatientBrithday { get; set; }
+ ///
+ /// 病人手机号码
+ ///
+ public string PatientMobile { get; set; }
+ ///
+ /// 病人电话
+ ///
+ public string PatientPhone { get; set; }
+ ///
+ /// 所在区县街道
+ ///
+ public string District { get; set; }
+ ///
+ /// 送货地址
+ ///
+ public string PostAddress { get; set; }
+ ///
+ /// 送货时间
+ ///
+ public string PostDatatime { get; set; }
+ ///
+ /// 贴数
+ ///
+ public string UseCount { get; set; }
+ ///
+ /// 病人性别
+ ///
+ public string PatientSex { get; set; }
+ ///
+ /// 病人姓名
+ ///
+ public string PatientName { get; set; }
+ ///
+ /// 医生姓名
+ ///
+ public string DoctorName { get; set; }
+ ///
+ /// 诊断
+ ///
+ public string Diagnosis { get; set; }
+ ///
+ /// 用法
+ ///
+ public string Usage { get; set; }
+ }
+
+ ///
+ /// 处方类型
+ ///
+ [Flags]
+ public enum PrescriptionType
+ {
+ ///
+ /// 订单
+ ///
+ Order = 1,
+ ///
+ /// 撤销订单,退单
+ ///
+ CancelOrder = 2,
+ ///
+ /// 测试方。测试处方不会发送给第三方
+ ///
+ TestOrder = 4,
+ }
+}
\ No newline at end of file
diff --git a/WebSiteCode/Cmdjy/Cmdjy/Web.config b/WebSiteCode/Cmdjy/Cmdjy/Web.config
index 742834d..129ea88 100644
--- a/WebSiteCode/Cmdjy/Cmdjy/Web.config
+++ b/WebSiteCode/Cmdjy/Cmdjy/Web.config
@@ -4,12 +4,21 @@
https://go.microsoft.com/fwlink/?LinkId=301880
-->
+
+
+
+
+
+
+
@@ -26,7 +35,7 @@
-
+
@@ -68,4 +77,14 @@
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebSiteCode/Cmdjy/Cmdjy/packages.config b/WebSiteCode/Cmdjy/Cmdjy/packages.config
index 9bc739d..8a07c5d 100644
--- a/WebSiteCode/Cmdjy/Cmdjy/packages.config
+++ b/WebSiteCode/Cmdjy/Cmdjy/packages.config
@@ -2,6 +2,7 @@
+