121 lines
3.9 KiB
TypeScript
121 lines
3.9 KiB
TypeScript
|
|
import { ObjectId } from "mongodb";
|
||
|
|
|
||
|
|
enum OrderSource {
|
||
|
|
ALIPAY_MINI = 'ALIPAY_MINI',
|
||
|
|
MATEPAD = 'MATEPAD',
|
||
|
|
}
|
||
|
|
|
||
|
|
enum PrescriptionType {
|
||
|
|
onlineMedicinePurchase = 'onlineMedicinePurchase', // 线上购药 (在线咨询 物流配送药品)
|
||
|
|
storeMedicinePurchase = 'storeMedicinePurchase', // 在线复诊(在线咨询 线下门店购药)
|
||
|
|
medicalWinePurchase = 'medicalWinePurchase', // 浸酒订单
|
||
|
|
}
|
||
|
|
|
||
|
|
enum DiagnosticStatus {
|
||
|
|
INIT = 'INIT', // 待审核
|
||
|
|
PASS = 'PASS', // 审核通过
|
||
|
|
UNPASS = 'UNPASS', // 审核未通过
|
||
|
|
EXPIRED = 'EXPIRED', // 订单过期
|
||
|
|
PASS_INVALID = 'PASS_INVALID', // 通过的处方作废
|
||
|
|
UNPASS_INVALID = 'UNPASS_INVALID', // 未通过的处方作废
|
||
|
|
INVALID = 'INVALID', // 处方作废
|
||
|
|
}
|
||
|
|
|
||
|
|
// 配药订单药品的his收费信息 (字段具体含义见接口文档)
|
||
|
|
interface HisChargeInfo {
|
||
|
|
drugGroupNo: string;//药房编码
|
||
|
|
drugId: string;//项目编码
|
||
|
|
drugSerial: string;//药品序列号
|
||
|
|
drugPrice: number;//药品单价
|
||
|
|
drugSumamt: number;//药品总金额 (计算得出 数量 x 单间)
|
||
|
|
}
|
||
|
|
|
||
|
|
interface Diagnosis {
|
||
|
|
code: string; // 诊断编码
|
||
|
|
name: string; // 诊断名称
|
||
|
|
desc: string; // 诊断描述
|
||
|
|
}
|
||
|
|
|
||
|
|
interface Drug {
|
||
|
|
_id?: string;
|
||
|
|
days: number; // 用药天数
|
||
|
|
dosage: number; // 单次剂量
|
||
|
|
dosage_unit: string; // 剂量单位
|
||
|
|
drugName: string; // 药品名称
|
||
|
|
specification: string; // 规格
|
||
|
|
frequencyCode: number; // 频次编码
|
||
|
|
frequencyName: string; // 频次名称
|
||
|
|
insurance_code: string; // 医保编码
|
||
|
|
product_id: number; // 产品id
|
||
|
|
quantity: number; // 数量
|
||
|
|
unit: string; // 单位
|
||
|
|
usageCode: number; // 用法编码
|
||
|
|
usageName: string; // 用法名称
|
||
|
|
package_amount: number; // 包装数量
|
||
|
|
recommended_quantity: number; // 推荐数量
|
||
|
|
hisChargeInfo?: HisChargeInfo; // his收费信息
|
||
|
|
forceSelfPay?:'Y'|'N'; // 是否强制自付
|
||
|
|
limitUsageScope?:'Y'|'N'; // 是否限制使用范围
|
||
|
|
}
|
||
|
|
|
||
|
|
interface Wine {
|
||
|
|
name: string; // 酒名
|
||
|
|
details: string; // 酒详情
|
||
|
|
efficacy: string; // 功效
|
||
|
|
hisId: string; // his酒编码
|
||
|
|
unit: string; // 单位
|
||
|
|
quantity: number; // 数量
|
||
|
|
}
|
||
|
|
|
||
|
|
interface DiagnosticRecord {
|
||
|
|
_id: ObjectId;
|
||
|
|
|
||
|
|
complaint: string; // 主诉
|
||
|
|
presentIllness: string; // 现病史
|
||
|
|
dispose: string; // 处置
|
||
|
|
|
||
|
|
doctorCAUserId: string; // 医生ca用户id
|
||
|
|
doctorName: string; // 医生姓名
|
||
|
|
doctorCode: string; // 医生编码
|
||
|
|
deptName: string; // 科室名称
|
||
|
|
unitCode: string; // 科室编码
|
||
|
|
|
||
|
|
patientId: string; // 患者id
|
||
|
|
name: string; // 患者姓名
|
||
|
|
blhno: string; // 病历号 同patientId
|
||
|
|
mobile: string; // 患者手机号
|
||
|
|
idCard: string; // 身份证号
|
||
|
|
sex: '男' | '女' | '';//性别
|
||
|
|
address: string; // 患者地址
|
||
|
|
|
||
|
|
orderId: string; // 咨询订单号
|
||
|
|
drugStoreNo: string; // 药店编码
|
||
|
|
orderSource: OrderSource; // 订单来源
|
||
|
|
medOrgOrderNo: string; // 处方单号(唯一)
|
||
|
|
prescriptionType: PrescriptionType; // 处方类型
|
||
|
|
|
||
|
|
diagnosisList: Diagnosis[]; // 诊断列表
|
||
|
|
drugs: Drug[]; // 药品列表
|
||
|
|
|
||
|
|
wines?: Wine[]; // 浸酒列表
|
||
|
|
pickUpType?: 'selfTake' | 'delivery'; // 取药方式
|
||
|
|
|
||
|
|
createTime: number; // 创建时间
|
||
|
|
status: DiagnosticStatus; // 状态
|
||
|
|
pharmacistNo: string; // 药师编号
|
||
|
|
pharmacist: string; // 药师姓名
|
||
|
|
prescriptionStartTime: number; // 处方开始时间
|
||
|
|
prescriptionEndTime: number; // 处方结束时间
|
||
|
|
auditTime?: number; // 审核时间
|
||
|
|
reasons?: string[]; // 拒绝原因列表
|
||
|
|
expireTime?: number; // 过期时间
|
||
|
|
|
||
|
|
// 可选字段
|
||
|
|
accountId?: string; // 账号id
|
||
|
|
updateTime?: number; // 更新时间
|
||
|
|
uploadStatus?: string; // 上传状态
|
||
|
|
hisUploadStatus?: string; // HIS上传状态
|
||
|
|
|
||
|
|
hisChargeStatus?: string // 配药订单处方的his支付状态 (在线购药的处方才有)
|
||
|
|
needReUpload?: boolean // 门店处方 是否需要重新上传(可能存在的场景 调用his接口上传成功了 但是his未上传医保, 需要药师手动去his的上传处理页面上传)
|
||
|
|
}
|