Compare commits
1 Commits
关羽
...
bugfix/518
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae8f0bc06b |
@@ -1034,6 +1034,17 @@ function normalizeSex(value) {
|
||||
return '未知';
|
||||
}
|
||||
|
||||
function normalizeSexFromPatientInfo(patientInfo) {
|
||||
// 优先使用文本字段
|
||||
if (patientInfo.genderEnum_enumText) return patientInfo.genderEnum_enumText;
|
||||
if (patientInfo.genderName) return patientInfo.genderName;
|
||||
if (patientInfo.sex) return normalizeSex(patientInfo.sex);
|
||||
// 使用数字枚举字段
|
||||
if (patientInfo.genderEnum === 1) return '男';
|
||||
if (patientInfo.genderEnum === 2) return '女';
|
||||
return '未知';
|
||||
}
|
||||
|
||||
function normalizeAgeUnit(value) {
|
||||
const ageUnitMap = {
|
||||
1: '岁',
|
||||
@@ -1295,7 +1306,7 @@ async function show(diagnosisData) {
|
||||
patName: patientInfo.patientName || patientInfo.name || '', // 患者姓名
|
||||
parentName: '', // 家长姓名(14岁以下患者必填)
|
||||
idNo: patientInfo.idCard, // 身份证号
|
||||
sex: patientInfo.sex || patientInfo.genderName || '男', // 性别
|
||||
sex: normalizeSexFromPatientInfo(patientInfo), // 性别
|
||||
|
||||
// 出生日期信息
|
||||
birthYear: birthInfo.year, // 出生年份
|
||||
|
||||
Reference in New Issue
Block a user