|
@@ -900,50 +900,162 @@ function handleEnter(event){
|
|
|
// const hosCode = message.hospitalCode
|
|
|
// return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
|
|
|
// };
|
|
|
+// 获取参数value
|
|
|
+function formatFormParmas(val,arr){
|
|
|
+ let item = arr.length!==0 && arr.find(item=>{
|
|
|
+ return item.id === val
|
|
|
+ })
|
|
|
+ return item.value
|
|
|
+}
|
|
|
+
|
|
|
function getEMRParams(){
|
|
|
const state = store.getState();
|
|
|
const {id} = state.historyTemplates && state.historyTemplates.HospitalInfo
|
|
|
const {message} = state.patInfo;
|
|
|
- const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
|
|
|
+ const { patInfoData } = state.patInfo;
|
|
|
+ console.log(state, 'state================');
|
|
|
+
|
|
|
+ const {
|
|
|
+ mainSuit,
|
|
|
+ currentIll,
|
|
|
+ otherHistory,
|
|
|
+ checkBody,
|
|
|
+ inspect,
|
|
|
+ assistCheck,
|
|
|
+ diagnosticList,
|
|
|
+ marriageHistory,
|
|
|
+ pastHistory,
|
|
|
+ personalHistory,
|
|
|
+ familyHistory,
|
|
|
+ menstruationHistory,
|
|
|
+ } = state;
|
|
|
const diag = [];
|
|
|
for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
|
|
|
diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
|
|
|
}
|
|
|
+ console.log(inspect.labelListSmall, 'inspect.labelListSmall');
|
|
|
const obj = {
|
|
|
- "hosCode": message.hospitalCode,
|
|
|
- "age": message.patientAge,
|
|
|
- "sex": message.sex,
|
|
|
- "deptName":message.hospitalDeptName,
|
|
|
- "chief": filterDataArr(mainSuit.saveText)||'',
|
|
|
- "symptom": filterDataArr(currentIll.saveText)||'',
|
|
|
- "vital": filterDataArr(checkBody.saveText)||'',
|
|
|
- "pasts": filterDataArr(otherHistory.saveText)||'',
|
|
|
+ "hospitalId": id || '',
|
|
|
+ "age": formatFormParmas('patientAge', patInfoData),
|
|
|
+ "sex": formatFormParmas('patientSex', patInfoData),
|
|
|
+ "deptName": formatFormParmas('hospitalDeptName', patInfoData),
|
|
|
+ "chief": filterDataArr(mainSuit.saveText)||'', //主诉
|
|
|
+ "symptom": filterDataArr(currentIll.saveText)||'', //现病史
|
|
|
+ "vital": filterDataArr(checkBody.saveText)||'', //查体
|
|
|
+ "pasts": filterDataArr(pastHistory.saveText)||'', //既往史
|
|
|
+ "marriage": '',
|
|
|
+ "personal": filterDataArr(personalHistory.saveText)||'', //个人史
|
|
|
+ "family": filterDataArr(familyHistory.saveText)||'', //家族史
|
|
|
+ "marital": filterDataArr(marriageHistory.saveText)||'', //婚育史
|
|
|
+ "menstrual": filterDataArr(menstruationHistory.saveText)||'', //月经史
|
|
|
+
|
|
|
"infectious": "",
|
|
|
- "operation": "",
|
|
|
+ "operation": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "operationOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "other": "",
|
|
|
+ "otherOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
"allergy": "",
|
|
|
"vaccination": "",
|
|
|
- "personal": "",
|
|
|
- "marital": "",
|
|
|
- "family": "",
|
|
|
- "menstrual": "",
|
|
|
- "other": filterDataArr(otherHistory.saveText)||'',
|
|
|
- "lisString": "",
|
|
|
- "pacsString": "",
|
|
|
- "diagString": "",
|
|
|
- "drugString": "",
|
|
|
- "lis": inspect.pushItem,
|
|
|
- "pacs": assistCheck.dataArr||[],
|
|
|
- "diag": [],
|
|
|
- "lisOrder": [],
|
|
|
- "pacsOrder": [],
|
|
|
- "diagOrder": diag,
|
|
|
- "drugOrder": [],
|
|
|
- "operationOrder": [],
|
|
|
- "otherOrder": [],
|
|
|
- "patientId": message.patientId,
|
|
|
- "drug": [],
|
|
|
- "marriage": "",
|
|
|
- "hospitalId": id || ''
|
|
|
+
|
|
|
+ "pacsString": "", //辅检文本数据
|
|
|
+ "lisString": "", // 化验文本数据
|
|
|
+ "diagString": "", //诊断文本数据
|
|
|
+ "drugString": "", // 药品文本数据
|
|
|
+ "lis": inspect.labelListSmall, // 化验项目和结果
|
|
|
+ "dept": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ], // 科室
|
|
|
+ "diag": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "diagOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "diseaseName": {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ },
|
|
|
+ "drug": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "drugOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "name": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "lisOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "detailName": "",
|
|
|
+ "maxValue": 0,
|
|
|
+ "minValue": 0,
|
|
|
+ "name": "",
|
|
|
+ "otherValue": "",
|
|
|
+ "result": "",
|
|
|
+ "source": 0,
|
|
|
+ "uniqueName": "",
|
|
|
+ "units": "",
|
|
|
+ "value": 0
|
|
|
+ }
|
|
|
+ ], // 当前化验开单项
|
|
|
+ "pacs": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "desc": "",
|
|
|
+ "name": "",
|
|
|
+ "result": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ], //辅检项目和结果
|
|
|
+ "pacsOrder": [
|
|
|
+ {
|
|
|
+ "dateValue": "",
|
|
|
+ "desc": "",
|
|
|
+ "name": "",
|
|
|
+ "result": "",
|
|
|
+ "uniqueName": ""
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "surgical": "",
|
|
|
+ "unknown": "", // 不能分类文本
|
|
|
+
|
|
|
}
|
|
|
return obj;
|
|
|
};
|