diff --git a/api_doc/v2.6.0_api_doc.md b/api_doc/v2.6.0_api_doc.md new file mode 100644 index 0000000..6a8053e --- /dev/null +++ b/api_doc/v2.6.0_api_doc.md @@ -0,0 +1,383 @@ +# V2.6.0 接口文档 - 甲状腺眼病患者注册字段新增 + + +## 1. 注册接口 account/reg + +**路由**: `?r=zd/account/reg` +**方法**: POST +**需要登录**: 是(systemUserId) + +### 请求参数 + +| 参数名 | 类型 | 必填(version>=2.6.0) | 说明 | +|---|---|---|---| +| registrationSource | int | 否 | 注册来源 | +| registChannel | int | 否 | 注册渠道 | +| regBusinessId | string | 否 | 注册业务Id | +| inviteDoctorId | int | 否 | 邀约医生Id | +| inviteChannel | int | 否 | 邀约渠道 | +| name | string | 否 | 姓名 | +| relationType | int | 是 | 关系类型 1-本人 2-亲友 | +| gender | int | 是 | 性别 1-男 2-女 | +| ageRange | int | 否 | 年龄段 1-18以下 2-18-29 3-30-40 4-41-50 5-51-65 6-65以上 | +| birth | string | 否 | 出生年月 YYYY-mm | +| diagnosisTime | string | 否 | 确诊时间 YYYY-mm | +| diagnoseType | int | 否 | 诊断类型 | +| IsAliQiWei | int | 否 | 是否阿里企微 1-是 2-否 | +| IsGraves | int | 否 | 是否Graves 1-是 2-否 3-不确定 | +| HasTedSurgery | int | 否 | 是否TED手术 1-是 2-否 3-不确定 | +| promotionMethodId | int | 否 | 推广方式Id | +| isKnowTituyo | int | 否 | 是否知道替妥尤 | +| isUseTituyo | int | 否 | 是否使用替妥尤 | +| diseaseStage | int | 是(version) | 疾病分级 1-轻度 2-中重度 3-极重度 | +| diseasePeriod | int | 是(version) | 疾病分期 1-活动期 2-非活动期 | +| tituyo | array | 否 | 替妥尤使用情况 | +| prescriptionImg | string | 否 | 处方图片 | +| **FirstDiagnosisDate** | string | **是(version>=2.6.0)** | **首次确诊甲状腺眼病的日期,格式 YYYY-MM-DD** | +| **IsRelapse** | int | **是(version>=2.6.0)** | **当前是否为复发 1-复发 2-新发** | +| **CurrentTreatmentPlan** | int | **是(version>=2.6.0)** | **正在进行的治疗方案 1-激素治疗(口服、冲击治疗、局部注射) 2-激素+替妥尤序贯治疗(不同时使用) 3-激素+替妥尤联合治疗(同时使用) 4-单用替妥尤(无激素/无免疫抑制剂) 5-托珠单抗 6-其他生物制剂 7-其他** | +| **PastTreatmentPlan** | string | **是(version>=2.6.0)** | **既往治疗方案,逗号分隔多选 1-口服激素 2-静脉激素冲击 3-局部注射激素 4-放疗 5-替妥尤单抗 6-托珠单抗 7-其他生物制剂 8-眶减压术 9-无** | +| **TeprotumumabFirstInfusionDate** | string | 否 | **替妥尤首次输注时间,格式 YYYY-MM-DD。仅在有新数据时更新,不会因治疗方案变化而清空** | +| **TeprotumumabInfusionCount** | int | 否 | **替妥尤已输注次数(入组时) 1-8具体次数 9表示>8。仅在有新数据时更新,不会因治疗方案变化而清空** | + +### 响应 + +```json +{ + "code": 0, + "message": "操作成功", + "data": "操作成功" +} +``` + +### 业务规则 + +- TeprotumumabFirstInfusionDate 和 TeprotumumabInfusionCount 如果有数据,仅通过接口更新数据,不会因为治疗方案选择了其他选项而删除 +- 当 CurrentTreatmentPlan 为2/3/4 或 PastTreatmentPlan 包含5时,应展开替妥尤输注相关问题(前端逻辑) +- version>=2.6.0 时,FirstDiagnosisDate、IsRelapse、CurrentTreatmentPlan、PastTreatmentPlan 为必填 + +--- + +## 2. 常量定义接口 account/dict + +**路由**: `?r=zd/account/dict` +**方法**: GET +**需要登录**: 否 + +返回V2.6.0新增字段的枚举选项列表,供前端渲染下拉/多选控件使用。 + +### 请求参数 + +无 + +### 响应 + +```json +{ + "code": 0, + "message": "success", + "data": { + "IsRelapseList": [ + { "1": "复发", "2": "新发" } + ], + "CurrentTreatmentPlanList": [ + { "1": "激素治疗(口服、冲击治疗、局部注射)", "2": "激素+替妥尤序贯治疗(不同时使用)", "3": "激素+替妥尤联合治疗(同时使用)", "4": "单用替妥尤(无激素/无免疫抑制剂)", "5": "托珠单抗", "6": "其他生物制剂", "7": "其他" } + ], + "PastTreatmentPlanList": [ + { "1": "口服激素", "2": "静脉激素冲击", "3": "局部注射激素", "4": "放疗", "5": "替妥尤单抗", "6": "托珠单抗", "7": "其他生物制剂", "8": "眶减压术", "9": "无" } + ], + "TeprotumumabInfusionCountList": [ + { "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": ">8" } + ] + } +} +``` + +### 返回字段说明 + +| 字段名 | 类型 | 说明 | +|---|---|---| +| IsRelapseList | object | 当前是否为复发选项,key为值,value为含义 | +| CurrentTreatmentPlanList | object | 正在进行的治疗方案选项,key为值,value为含义 | +| PastTreatmentPlanList | object | 既往治疗方案选项(多选),key为值,value为含义,传入时以逗号分隔的key值组合 | +| TeprotumumabInfusionCountList | object | 替妥尤已输注次数选项,key为值,value为含义,9表示>8 | + +--- + +## 3. 获取个人信息接口 account/info + +**路由**: `?r=zd/account/info` +**方法**: GET +**需要登录**: 是(systemUserId) + +### 请求参数 + +无额外参数,通过登录态获取用户信息。 + +### 响应 + +```json +{ + "code": 0, + "message": "success", + "data": { + "UserId": "xxx", + "PatientId": "xxx", + "PatientName": "xxx", + "AuditStatus": 3, + "UserType": 3, + "RelationType": 1, + "UserImg": "xxx", + "Telephone": "xxx", + "EntryThreePeriod": 0, + "MedicineAuditSwitch": "0", + "has7DayAdl": 1, + "isFollow": 1, + "isShowFollowGuide": 2, + "UserRegTime": "xxx", + "AdlNotifySwitch": 1, + "OpenTraining": 1, + "IsRootUser": 1, + "AgeYear": 30, + "AgeMonth": 5, + "Birth": "1995-05", + "Gender": 1, + "AgeRange": 3, + "AntibodyType": 1, + "ThyroidAbnormal": 1, + "PreviousConvulsion": 2, + "TraditionalImmunosuppressant": 1, + "MedicalInsuranceType": 1, + "DiagnosisTime": "2024-01", + "DiagnoseType": 1, + "DiagnoseImg": "xxx", + "CommitTime": "xxx", + "AuditStatus": 3, + "RejectReason": "", + "IsSick": 1, + "PatientCanFollowUp": 1, + "IsUseDrugs": 1, + "IsKnowTituyo": 1, + "IsUseTituyo": 2, + "PrescriptionImg": "xxx", + "DrugsAuditStatus": 3, + "UseDrugsAuditStatus": 3, + "UseDrugsAuditTime": "xxx", + "UseDrugsRejectReason": "", + "UseDrugsImg": "xxx", + "UseDrugsCommitTime": "xxx", + "JoinDays": 100, + "IsGraves": 1, + "HasTedSurgery": 2, + "HasSelf": 1, + "DiagnosisCertificate": "xxx", + "InviteDoctorId": 1, + "ExclusiveDoctorId": 1, + "ExclusiveDoctorImg": "xxx", + "ExclusiveDoctorName": "xxx", + "ExclusiveDoctorHospitalId": 1, + "ExclusiveDoctorHospitalName": "xxx", + "ExclusiveDoctorHospitalClassification": 1, + "ExclusiveDoctorHospitalClassificationName": "xxx", + "ExclusiveDoctorHospitalLevel": 1, + "ExclusiveDoctorHospitalLevelName": "xxx", + "EntryTwoPeriod": 0, + "EntryThreePeriod": 0, + "DiseaseStage": 2, + "DiseasePeriod": 1, + "FirstDiagnosisDate": "2024-06-15", + "IsRelapse": 1, + "CurrentTreatmentPlan": 2, + "PastTreatmentPlan": "1,2,5", + "TeprotumumabFirstInfusionDate": "2025-03-20", + "TeprotumumabInfusionCount": 4, + "tituyo": [], + "tituyoList": [] + } +} +``` + +### V2.6.0 新增返回字段说明 + +| 字段名 | 类型 | 说明 | +|---|---|---| +| FirstDiagnosisDate | string | 首次确诊甲状腺眼病的日期,格式 YYYY-MM-DD | +| IsRelapse | int | 当前是否为复发 1-复发 2-新发 | +| CurrentTreatmentPlan | int | 正在进行的治疗方案 1-7 | +| PastTreatmentPlan | string | 既往治疗方案,逗号分隔多选 1-9 | +| TeprotumumabFirstInfusionDate | string | 替妥尤首次输注时间,格式 YYYY-MM-DD | +| TeprotumumabInfusionCount | int | 替妥尤已输注次数(入组时) 1-8具体次数 9表示>8 | + +--- + +## 4. 患者列表接口 patient/list(后台) + +**路由**: `?r=family/patient/list` +**方法**: GET +**需要登录**: 是(后台管理端登录) + +### 请求参数 + +| 参数名 | 类型 | 必填 | 说明 | +|---|---|---|---| +| Search | string | 否 | 搜索关键词(患者姓名、医生姓名、PatientId、手机号) | +| UserType | int | 否 | 用户类型 1-空白 2-注册 3-疾病 4-用药 | +| DiagnoseType | int | 否 | 诊断类型 | +| BecomePatientTimeBegin | string | 否 | 成为患者时间开始 | +| BecomePatientTimeEnd | string | 否 | 成为患者时间结束 | +| UseDrugsJoinTimeBegin | string | 否 | 用药时间开始 | +| UseDrugsJoinTimeEnd | string | 否 | 用药时间结束 | +| LastUseDrugsTimeBegin | string | 否 | 最近一次用药时间开始 | +| LastUseDrugsTimeEnd | string | 否 | 最近一次用药时间结束 | +| RegistChannel | int | 否 | 注册渠道 | +| RegionLTwoId | int | 否 | 大分区筛选 | +| TelephoneRegionId | int | 否 | 电话大区筛选 | +| HospitalRegionLTwoId | int | 否 | 邀约大区筛选 | +| HospitalRegionLThreeId | int | 否 | 邀约地区筛选 | +| Sort | string | 否 | 排序字段 | +| SamePatient | int | 否 | 相同患者筛选 | +| InsuranceSuccessTimeBegin | string | 否 | 商保审核成功时间开始 | +| InsuranceSuccessTimeEnd | string | 否 | 商保审核成功时间结束 | +| InviteChannel | int | 否 | 邀约渠道 1-医生码 2-QOL | +| InviteDoctorId | int | 否 | 邀约医生Id | +| IsOpenNrdlActivity | int | 否 | 是否打开NRDL活动 | +| count | int | 否 | 每页条数,默认10 | +| UseDrugsDate | string | 否 | 用药日期 | +| beijingFlag | int | 否 | 北京标识 | +| shanghaiFlag | int | 否 | 上海标识 | +| guangzhouFlag | int | 否 | 广州标识 | +| guangdongFlag | int | 否 | 广东标识 | +| IsAliQiWei | int | 否 | 是否阿里企微 1-是 2-否 | +| promotionMethodId | int | 否 | 推广方式Id | +| IsKnowTituyo | int | 否 | 是否知道替妥尤 | +| IsUseTituyo | int | 否 | 是否使用替妥尤 | +| **IsRelapse** | int | 否 | **当前是否为复发 1-复发 2-新发** | +| **CurrentTreatmentPlan** | int | 否 | **正在进行的治疗方案 1-7** | + +### 响应 + +```json +{ + "code": 0, + "message": "success", + "data": { + "list": [ + { + "PatientId": 1, + "Name": "xxx", + "UserId": "xxx", + "Telephone": "xxx", + "RelationType": 1, + "PromotionMethodId": 1, + "AgeYear": 30, + "AgeMonth": 5, + "Gender": 1, + "Avatar": "xxx", + "DiagnoseType": 1, + "BecomePatientTime": "xxx", + "DiagnoseImg": "xxx", + "UseDrugsJoinTime": "xxx", + "ConversionDays": 10, + "AdlNums": 5, + "IsSick": 1, + "IsUseDrugs": 1, + "IsAliQiWei": 2, + "LastAdlId": 1, + "UseDrugsNum": 3, + "LastUseDrugsTime": "xxx", + "IsGraves": 1, + "HasTedSurgery": 2, + "IsKnowTituyo": 1, + "IsUseTituyo": 2, + "DiseaseStage": 2, + "DiseasePeriod": 1, + "FirstDiagnosisDate": "2024-06-15", + "IsRelapse": 1, + "CurrentTreatmentPlan": 2, + "PastTreatmentPlan": "1,2,5", + "TeprotumumabFirstInfusionDate": "2025-03-20", + "TeprotumumabInfusionCount": 4, + "IsRelapseName": "复发", + "CurrentTreatmentPlanName": "激素+替妥尤序贯治疗(不同时使用)", + "PastTreatmentPlanName": "口服激素,静脉激素冲击,替妥尤单抗", + "TeprotumumabInfusionCountName": "4", + "...": "其他字段" + } + ], + "pages": { "totalCount": 100, "pageCount": 10, "currentPage": 1, "perPage": 10 }, + "count": 100, + "page": 1, + "AllPatient": 100, + "NanPatient": 50, + "NvPatient": 50, + "SickPatient": 80, + "UseDrugsPatient": 20 + } +} +``` + +### V2.6.0 新增筛选条件说明 + +| 参数名 | 类型 | 说明 | +|---|---|---| +| IsRelapse | int | 筛选当前是否为复发 1-复发 2-新发 | +| CurrentTreatmentPlan | int | 簿选正在进行的治疗方案 1-7 | + +### V2.6.0 新增返回字段说明 + +| 字段名 | 类型 | 说明 | +|---|---|---| +| FirstDiagnosisDate | string | 首次确诊甲状腺眼病的日期 YYYY-MM-DD | +| IsRelapse | int | 当前是否为复发 1-复发 2-新发 | +| IsRelapseName | string | 当前是否为复发的文本,如"复发"/"新发" | +| CurrentTreatmentPlan | int | 正在进行的治疗方案 1-7 | +| CurrentTreatmentPlanName | string | 正在进行的治疗方案的文本 | +| PastTreatmentPlan | string | 既往治疗方案,逗号分隔多选 1-9 | +| PastTreatmentPlanName | string | 既往治疗方案的文本,逗号分隔,如"口服激素,静脉激素冲击,替妥尤单抗" | +| TeprotumumabFirstInfusionDate | string | 替妥尤首次输注时间 YYYY-MM-DD | +| TeprotumumabInfusionCount | int | 替妥尤已输注次数(入组时) 1-8具体次数 9表示>8 | +| TeprotumumabInfusionCountName | string | 替妥尤已输注次数的文本,9时显示">8" | + +--- + +## 附录:常量值域对照表 + +### IsRelapse - 当前是否为复发 + +| 值 | 含义 | +|---|---| +| 1 | 复发 | +| 2 | 新发 | + +### CurrentTreatmentPlan - 正在进行的治疗方案 + +| 值 | 含义 | +|---|---| +| 1 | 激素治疗(口服、冲击治疗、局部注射) | +| 2 | 激素+替妥尤序贯治疗(不同时使用) | +| 3 | 激素+替妥尤联合治疗(同时使用) | +| 4 | 单用替妥尤(无激素/无免疫抑制剂) | +| 5 | 托珠单抗 | +| 6 | 其他生物制剂 | +| 7 | 其他 | + +### PastTreatmentPlan - 既往治疗方案(多选,逗号分隔存储) + +| 值 | 含义 | +|---|---| +| 1 | 口服激素 | +| 2 | 静脉激素冲击 | +| 3 | 局部注射激素 | +| 4 | 放疗 | +| 5 | 替妥尤单抗 | +| 6 | 托珠单抗 | +| 7 | 其他生物制剂 | +| 8 | 眶减压术 | +| 9 | 无 | + +### TeprotumumabInfusionCount - 替妥尤已输注次数(入组时) + +| 值 | 含义 | +|---|---| +| 1-8 | 具体输注次数 | +| 9 | >8次 | diff --git a/project.config.json b/project.config.json index 1d8faf4..625d498 100644 --- a/project.config.json +++ b/project.config.json @@ -71,5 +71,5 @@ } ] }, - "appid": "wx71ac9c27c3c3e3f4" + "appid": "wxf9ce8010f1ad24aa" } \ No newline at end of file diff --git a/src/app.ts b/src/app.ts index f027e32..a08a6c8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -14,19 +14,19 @@ dayjs.extend(relativeTime) App({ globalData: { - version: '2.0', // 在数据请求里面发送给后端的版本号[X-MP-Version] + version: '2.6.0', // 在数据请求里面发送给后端的版本号[X-MP-Version] // 测试号 wx2b0bb13edf717c1d // dev // appid:wxf9ce8010f1ad24aa - // url: 'https://m.xd.hbraas.com', - // upFileUrl: 'https://m.xd.hbraas.com/', - // imageUrl: 'https://m.xd.hbraas.com/xd/', + url: 'https://m.xd.hbraas.com', + upFileUrl: 'https://m.xd.hbraas.com/', + imageUrl: 'https://m.xd.hbraas.com/xd/', // pro // appid:wx71ac9c27c3c3e3f4 - url: 'https://m.xd.hbsaas.com', - upFileUrl: 'https://m.xd.hbsaas.com/', - imageUrl: 'https://m.xd.hbsaas.com/api/xd/', + // url: 'https://m.xd.hbsaas.com', + // upFileUrl: 'https://m.xd.hbsaas.com/', + // imageUrl: 'https://m.xd.hbsaas.com/api/xd/', loginState: '', isLogin: 0, diff --git a/src/components/toast/index.wxml b/src/components/toast/index.wxml index 7b88392..e235d00 100644 --- a/src/components/toast/index.wxml +++ b/src/components/toast/index.wxml @@ -747,10 +747,8 @@ - - + style="background: url({{imageUrl}}bg62.png?t={{Timestamp}}) no-repeat top center/100%" + > CurrentTreatmentPlanList[k]) + const cpIndex = cpKeys.indexOf(String(currentTreatmentPlan)) + const icKeys = Object.keys(TeprotumumabInfusionCountList) + const icNames = icKeys.map(k => TeprotumumabInfusionCountList[k]) + const icIndex = icKeys.indexOf(String(teprotumumabInfusionCount)) + this.setData({ + currentTreatmentPlanNames: cpNames, + currentTreatmentPlanIndex: cpIndex >= 0 ? cpIndex : 0, + teprotumumabInfusionCountNames: icNames, + teprotumumabInfusionCountIndex: icIndex >= 0 ? icIndex : 0, + }) + }, onLoad(options) { this.setData({ pagePath: options.page, @@ -67,7 +107,24 @@ Page({ diseaseStage: zdUserInfo.DiseaseStage, diseasePeriod: zdUserInfo.DiseaseStage, HasTedSurgery: zdUserInfo.HasTedSurgery, + // v2.6.0 新增字段回显 + firstDiagnosisDate: zdUserInfo.FirstDiagnosisDate || '', + isRelapse: zdUserInfo.IsRelapse || '', + currentTreatmentPlan: zdUserInfo.CurrentTreatmentPlan || '', + pastTreatmentPlan: (zdUserInfo.PastTreatmentPlan || '').split(',').reduce( + (acc: Record, k: string) => { + if (k) { + acc[k] = true + } + return acc + }, + {} as Record, + ), + teprotumumabFirstInfusionDate: zdUserInfo.TeprotumumabFirstInfusionDate || '', + teprotumumabInfusionCount: zdUserInfo.TeprotumumabInfusionCount || '', }) + this._updateTeprotumumabVisibility() + this._syncPickerData() }) }) }, @@ -81,6 +138,20 @@ Page({ dict: res, }) }) + // v2.6.0 新增字典 + wx.ajax({ + method: 'GET', + url: '?r=zd/account/dict', + data: {}, + }).then((res) => { + this.setData({ + IsRelapseList: res.IsRelapseList || {}, + CurrentTreatmentPlanList: res.CurrentTreatmentPlanList || {}, + PastTreatmentPlanList: res.PastTreatmentPlanList || {}, + TeprotumumabInfusionCountList: res.TeprotumumabInfusionCountList || {}, + }) + this._syncPickerData() + }) }, handleRelationType(e: WechatMiniprogram.CustomEvent) { const { id } = e.currentTarget.dataset @@ -118,6 +189,65 @@ Page({ diseasePeriod: id, }) }, + // v2.6.0 首次确诊日期 + handleFirstDiagnosisDateChange(e: any) { + this.setData({ + firstDiagnosisDate: e.detail.value, + }) + }, + // v2.6.0 是否复发 + handleSelectIsRelapse(e: WechatMiniprogram.CustomEvent) { + const { id } = e.currentTarget.dataset + this.setData({ + isRelapse: id, + }) + }, + // v2.6.0 正在进行的治疗方案 + handleCurrentTreatmentPlanChange(e: any) { + const keys = Object.keys(this.data.CurrentTreatmentPlanList) + const selectedIndex = Number(e.detail.value) + const selectedKey = keys[selectedIndex] + this.setData({ + currentTreatmentPlan: selectedKey, + }) + this._updateTeprotumumabVisibility() + this._syncPickerData() + }, + // v2.6.0 既往治疗方案(多选) + handleSelectPastTreatmentPlan(e: WechatMiniprogram.CustomEvent) { + const { id } = e.currentTarget.dataset + const { pastTreatmentPlan } = this.data + pastTreatmentPlan[id] = !pastTreatmentPlan[id] + this.setData({ + pastTreatmentPlan, + }) + this._updateTeprotumumabVisibility() + }, + // 判断是否展示替妥尤输注相关问题 + _updateTeprotumumabVisibility() { + const { currentTreatmentPlan, pastTreatmentPlan } = this.data + // CurrentTreatmentPlan 为 2/3/4 或 PastTreatmentPlan 包含 5 时展开 + const show = ['2', '3', '4'].includes(String(currentTreatmentPlan)) || pastTreatmentPlan['5'] + this.setData({ + showTeprotumumabFields: !!show, + }) + }, + // v2.6.0 替妥尤首次输注时间 + handleTeprotumumabFirstInfusionDateChange(e: any) { + this.setData({ + teprotumumabFirstInfusionDate: e.detail.value, + }) + }, + // v2.6.0 替妥尤已输注次数 + handleTeprotumumabInfusionCountChange(e: any) { + const keys = Object.keys(this.data.TeprotumumabInfusionCountList) + const selectedIndex = Number(e.detail.value) + const selectedKey = keys[selectedIndex] + this.setData({ + teprotumumabInfusionCount: selectedKey, + }) + this._syncPickerData() + }, handleSelectHasTedSurgery(e: WechatMiniprogram.CustomEvent) { const { id } = e.currentTarget.dataset this.setData({ @@ -201,11 +331,22 @@ Page({ tituyo, prescriptionImg, + // v2.6.0 新增字段 + firstDiagnosisDate, + isRelapse, + currentTreatmentPlan, + pastTreatmentPlan, + teprotumumabFirstInfusionDate, + teprotumumabInfusionCount, + jump, } = this.data const { registrationSource, registChannel, regBusinessId, WorkerId, IsAliQiWei } = app.globalData const { doctorId, inviteChan, proMethodId } = app.globalData.scene - if (!name || !gender || !ageRange || !relationType || !diseaseStage || !diseasePeriod) { + const { showTeprotumumabFields } = this.data + if (!name || !gender || !ageRange || !relationType || !diseaseStage || !diseasePeriod + || !firstDiagnosisDate || !isRelapse || !currentTreatmentPlan || !Object.values(pastTreatmentPlan).some(v => v) + || (showTeprotumumabFields && (!teprotumumabFirstInfusionDate || !teprotumumabInfusionCount))) { wx.showToast({ title: '完善个人信息,可获得【医生】更多关注', icon: 'none' }) return } @@ -239,6 +380,14 @@ Page({ isKnowTituyo, tituyo: Object.keys(tituyo), + // v2.6.0 新增字段 + FirstDiagnosisDate: firstDiagnosisDate, + IsRelapse: isRelapse, + CurrentTreatmentPlan: currentTreatmentPlan, + PastTreatmentPlan: Object.keys(pastTreatmentPlan).filter(k => pastTreatmentPlan[k]).join(','), + TeprotumumabFirstInfusionDate: teprotumumabFirstInfusionDate || '', + TeprotumumabInfusionCount: teprotumumabInfusionCount || '', + WorkerId, inviteDoctorId: doctorId, inviteChannel: inviteChan, diff --git a/src/patient/pages/enterInfo/index.wxml b/src/patient/pages/enterInfo/index.wxml index f83f389..8688b4d 100644 --- a/src/patient/pages/enterInfo/index.wxml +++ b/src/patient/pages/enterInfo/index.wxml @@ -16,7 +16,7 @@ 本人 - + 亲友 @@ -68,7 +68,7 @@ - 您的甲状腺眼病分期 + 您的甲状腺眼病分期 - 是否有Graves病病史 - - - {{item}} + + 首次确诊甲状腺眼病的日期 + + + {{firstDiagnosisDate}} + - - 是否有甲状腺眼病相关眼部手术史 + + + 当前是否为复发 {{item}} - - 是否了解生物制剂替妥尤单抗N01 - - - - {{item}} + + 您正在进行的治疗方案 + + + {{CurrentTreatmentPlanList[currentTreatmentPlan] || ''}} + - - - 如何看待新药替妥尤单抗N01 - (多选) - - + + + 您的既往治疗方案(多选) + {{item}} - + + + 替妥尤首次输注时间 + + + {{teprotumumabFirstInfusionDate}} + + + + + 替妥尤已输注的次数 + + + {{TeprotumumabInfusionCountList[teprotumumabInfusionCount] || ''}} + + + + + + + + 是否有Graves病病史 + + + {{item}} + + + 是否有甲状腺眼病相关眼部手术史 + + + {{item}} + + + 是否了解生物制剂替妥尤单抗N01 + + + {{item}} + + - 请上传您的处方证明 - 处方证明审核通过后,即可享受平台全部服务 + 如何看待新药替妥尤单抗N01 + (多选) + + + + {{item}} + - 您可以上传您的诊断处方、住院小结等 + + + 请上传您的处方证明 + 处方证明审核通过后,即可享受平台全部服务 + + 您可以上传您的诊断处方、住院小结等 + diff --git a/src/patient/pages/index/index.scss b/src/patient/pages/index/index.scss index 36e802b..c2b0d58 100644 --- a/src/patient/pages/index/index.scss +++ b/src/patient/pages/index/index.scss @@ -890,9 +890,9 @@ page { bottom: calc(env(safe-area-inset-bottom) + 120rpx); width: 690rpx; height: 152rpx; - box-shadow: 0rpx 2rpx 16rpx 0rpx #390f1b2d; + box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0,0,0,0.08); border-radius: 24rpx; - background: linear-gradient(346deg, #ffffff 0%, #ffe2eb 100%); + background: linear-gradient( 358deg, #FFFFFF 0%, #F2E8FF 100%); border: 2rpx solid #ffffff; display: flex; align-items: center; @@ -909,13 +909,13 @@ page { flex: 1; .title { font-size: 32rpx; - color: rgba(40, 48, 49, 1); + color: rgba(33, 29, 46, 1); font-weight: bold; } .content { - margin-top: 4rpx; - font-size: 28rpx; - color: rgba(154, 161, 162, 1); + margin-top: 12rpx; + font-size: 24rpx; + color: rgba(105, 104, 110, 1); } } .btn { @@ -926,7 +926,7 @@ page { display: flex; align-items: center; justify-content: center; - background: #cf5375; + background: linear-gradient( 197deg, #FFBCF9 0%, #B982FF 100%); border-radius: 12rpx 12rpx 12rpx 12rpx; } .close { diff --git a/src/patient/pages/index/index.ts b/src/patient/pages/index/index.ts index dbf2c79..30fdbe8 100644 --- a/src/patient/pages/index/index.ts +++ b/src/patient/pages/index/index.ts @@ -55,6 +55,8 @@ Page({ options: {} as any, enterJump: false, + + publicCard: false, }, onLoad(options) { const systemInfo = wx.getSystemInfoSync() @@ -101,6 +103,7 @@ Page({ app.getZdUserInfo(this, true, (zdUserInfo) => { this.setData({ zdUserInfo, + publicCard: zdUserInfo.isShowFollowGuide == 1, }) if (zdUserInfo.ExclusiveDoctorId) { app.mpBehavior({ PageName: 'PG_PatientHomeDoctorCard' }) @@ -676,4 +679,22 @@ Page({ url: '/patient/pages/followForm/index', }) }, + handlePublic() { + this.setData({ + toastShow: true, + toastType: 'public-toast', + toastParams: {}, + }) + this.handlePublicClose() + }, + handlePublicClose() { + this.setData({ + publicCard: false, + }) + wx.ajax({ + method: 'POST', + url: '?r=zd/account/add-user-subscribe-guide-record', + data: {}, + }) + }, }) diff --git a/src/patient/pages/index/index.wxml b/src/patient/pages/index/index.wxml index 5874ac5..b9c396d 100644 --- a/src/patient/pages/index/index.wxml +++ b/src/patient/pages/index/index.wxml @@ -314,6 +314,15 @@ src="{{imageUrl}}za-images/5/reg-close.png?t={{Timestamp}}" > + + + + 关注公众号 + 重要提醒不丢失~ + + 去关注 + + , + + // v2.6.0 日期相关 + today: dayjs().format('YYYY-MM-DD'), + selectDiagnoseTypeIndex: '0', diagnoseTypeShow: false, diagnoseTypeValue: '0', @@ -100,6 +121,20 @@ Page({ dict: res, }) }) + // v2.6.0 新增字典 + wx.ajax({ + method: 'GET', + url: '?r=zd/account/dict', + data: {}, + }).then((res) => { + this.setData({ + IsRelapseList: res.IsRelapseList || {}, + CurrentTreatmentPlanList: res.CurrentTreatmentPlanList || {}, + PastTreatmentPlanList: res.PastTreatmentPlanList || {}, + TeprotumumabInfusionCountList: res.TeprotumumabInfusionCountList || {}, + }) + this._syncPickerData() + }) }, formatUserInfo(res) { @@ -111,11 +146,23 @@ Page({ }) res.tituyo = tituyo } + // v2.6.0 既往治疗方案多选转换 + const pastStr = res.PastTreatmentPlan || '' + const pastTreatmentPlanMap: Record = {} + pastStr.split(',').forEach((k: string) => { + if (k) { + pastTreatmentPlanMap[k] = true + } + }) + this.setData({ zdUserInfo: res, + pastTreatmentPlanMap, }) this.formatBorn(res.Birth) + this._updateTeprotumumabVisibility() + this._syncPickerData() if (this.data.scrollBottom) { wx.pageScrollTo({ @@ -184,6 +231,79 @@ Page({ }) this.updateUserInfo() }, + // v2.6.0 同步 picker 数组与索引 + _syncPickerData() { + const { CurrentTreatmentPlanList, TeprotumumabInfusionCountList, zdUserInfo } = this.data + const cpKeys = Object.keys(CurrentTreatmentPlanList) + const cpNames = cpKeys.map(k => CurrentTreatmentPlanList[k]) + const cpIndex = cpKeys.indexOf(String(zdUserInfo.CurrentTreatmentPlan)) + const icKeys = Object.keys(TeprotumumabInfusionCountList) + const icNames = icKeys.map(k => TeprotumumabInfusionCountList[k]) + const icIndex = icKeys.indexOf(String(zdUserInfo.TeprotumumabInfusionCount)) + this.setData({ + currentTreatmentPlanNames: cpNames, + currentTreatmentPlanIndex: cpIndex >= 0 ? cpIndex : 0, + teprotumumabInfusionCountNames: icNames, + teprotumumabInfusionCountIndex: icIndex >= 0 ? icIndex : 0, + }) + }, + // v2.6.0 判断是否展示替妥尤输注相关问题 + _updateTeprotumumabVisibility() { + const { zdUserInfo, pastTreatmentPlanMap } = this.data + // CurrentTreatmentPlan 为 2/3/4 或 PastTreatmentPlan 包含 5 时展开 + const show = ['2', '3', '4'].includes(String(zdUserInfo.CurrentTreatmentPlan)) || pastTreatmentPlanMap['5'] + this.setData({ + showTeprotumumabFields: !!show, + }) + }, + // v2.6.0 首次确诊日期 + handleFirstDiagnosisDateChange(e: any) { + this.setData({ + 'zdUserInfo.FirstDiagnosisDate': e.detail.value, + }) + this.updateUserInfo() + }, + // v2.6.0 正在进行的治疗方案 picker + handleCurrentTreatmentPlanChange(e: any) { + const keys = Object.keys(this.data.CurrentTreatmentPlanList) + const selectedIndex = Number(e.detail.value) + const selectedKey = keys[selectedIndex] + this.setData({ + 'zdUserInfo.CurrentTreatmentPlan': selectedKey, + }) + this._updateTeprotumumabVisibility() + this._syncPickerData() + this.updateUserInfo() + }, + // v2.6.0 既往治疗方案多选 + handlePastTreatmentPlanSelect(e: WechatMiniprogram.CustomEvent) { + const { id } = e.currentTarget.dataset + const { pastTreatmentPlanMap } = this.data + pastTreatmentPlanMap[id] = !pastTreatmentPlanMap[id] + this.setData({ + pastTreatmentPlanMap, + }) + this._updateTeprotumumabVisibility() + this.updateUserInfo() + }, + // v2.6.0 替妥尤首次输注时间 + handleTeprotumumabFirstInfusionDateChange(e: any) { + this.setData({ + 'zdUserInfo.TeprotumumabFirstInfusionDate': e.detail.value, + }) + this.updateUserInfo() + }, + // v2.6.0 替妥尤已输注次数 picker + handleTeprotumumabInfusionCountChange(e: any) { + const keys = Object.keys(this.data.TeprotumumabInfusionCountList) + const selectedIndex = Number(e.detail.value) + const selectedKey = keys[selectedIndex] + this.setData({ + 'zdUserInfo.TeprotumumabInfusionCount': selectedKey, + }) + this._syncPickerData() + this.updateUserInfo() + }, updateUserInfo(update = true) { if (!update) return @@ -211,6 +331,13 @@ Page({ ...zdUserInfo, tituyo: Object.keys(zdUserInfo.tituyo).filter(item => zdUserInfo.tituyo[item]), prescriptionImg: zdUserInfo.PrescriptionImg, + // v2.6.0 新增字段 + FirstDiagnosisDate: zdUserInfo.FirstDiagnosisDate, + IsRelapse: zdUserInfo.IsRelapse, + CurrentTreatmentPlan: zdUserInfo.CurrentTreatmentPlan, + PastTreatmentPlan: Object.keys(this.data.pastTreatmentPlanMap).filter(k => this.data.pastTreatmentPlanMap[k]).join(','), + TeprotumumabFirstInfusionDate: zdUserInfo.TeprotumumabFirstInfusionDate || '', + TeprotumumabInfusionCount: zdUserInfo.TeprotumumabInfusionCount || '', }, }) .then((_res) => { diff --git a/src/patient/pages/personalInformation/index.wxml b/src/patient/pages/personalInformation/index.wxml index c18294b..e820517 100644 --- a/src/patient/pages/personalInformation/index.wxml +++ b/src/patient/pages/personalInformation/index.wxml @@ -123,6 +123,100 @@ + + + + + 首次确诊甲状腺眼病的日期 + + + + + {{zdUserInfo.FirstDiagnosisDate || '请选择日期'}} + + + + + + + + 当前是否为复发 + + + + + {{item}} + + + + + + + 您正在进行的治疗方案 + + + + + {{CurrentTreatmentPlanList[zdUserInfo.CurrentTreatmentPlan] || '请选择治疗方案'}} + + + + + + + + 您的既往治疗方案(多选) + + + + + {{item}} + + + + + + + + 替妥尤首次输注时间 + + + + + {{zdUserInfo.TeprotumumabFirstInfusionDate || '请选择日期'}} + + + + + + + + 替妥尤已输注的次数 + + + + + {{TeprotumumabInfusionCountList[zdUserInfo.TeprotumumabInfusionCount] || '请选择已输注的次数'}} + + + + + + + 是否有Graves病病史