|
@@ -903,7 +903,520 @@
|
903
|
903
|
},
|
904
|
904
|
|
905
|
905
|
choosePatient(val) {
|
|
906
|
+ console.log(val)
|
|
907
|
+ if(this.titleType == '电子病历'){
|
|
908
|
+ console.log('this.$refs.child.watchSign',this.$refs.child.watchSign)
|
|
909
|
+ if(this.$refs.child.watchSign > 2){
|
|
910
|
+ this.$confirm('是否保存当前病例', '保存', {
|
|
911
|
+ confirmButtonText: '确 定',
|
|
912
|
+ cancelButtonText: '取 消',
|
|
913
|
+ type: 'warning'
|
|
914
|
+ }).then(() => {
|
|
915
|
+
|
|
916
|
+ this.$refs.child.createCaseHistory(this.newPatientId)
|
|
917
|
+ this.patientid = val.id
|
|
918
|
+
|
|
919
|
+ let params = {
|
|
920
|
+ 'record_date': this.record_date,
|
|
921
|
+ 'patient_id': val.id,
|
|
922
|
+ 'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
|
923
|
+ 'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
|
|
924
|
+ }
|
|
925
|
+ getPatientInfo(params).then(response => {
|
|
926
|
+ if (response.data.state == 0) {
|
|
927
|
+ this.$message.error(response.data.msg)
|
|
928
|
+ return false
|
|
929
|
+ } else {
|
|
930
|
+ this.prescriptions = []
|
|
931
|
+
|
|
932
|
+ this.month_prescriptions = []
|
|
933
|
+
|
|
934
|
+ var month_prescriptions = response.data.data.month_prescriptions
|
|
935
|
+ this.setMonthPrescription(month_prescriptions)
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+ this.patientInfo = response.data.data.xt_info
|
|
939
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
940
|
+ this.case_history = response.data.data.case_history
|
|
941
|
+ console.log("数据是22222多少",this.case_history)
|
|
942
|
+ this.info = response.data.data.info
|
|
943
|
+ this.doctors = response.data.data.doctors
|
|
944
|
+ this.department = response.data.data.department
|
|
945
|
+
|
|
946
|
+ for (let i = 0; i < this.doctors.length; i++){
|
|
947
|
+ if(this.doctors[i].user_type == 1){
|
|
948
|
+ this.doctors.splice(i,1)
|
|
949
|
+ }
|
|
950
|
+ }
|
|
951
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
952
|
+ if (this.case_history.breathing <= 0) {
|
|
953
|
+ this.case_history.breathing = ""
|
|
954
|
+ }
|
|
955
|
+ if (this.case_history.sick <= 0) {
|
|
956
|
+ this.case_history.sick = ""
|
|
957
|
+ }
|
|
958
|
+ if (this.case_history.diagnose <= 0) {
|
|
959
|
+ this.case_history.diagnose = ""
|
|
960
|
+ }
|
|
961
|
+
|
|
962
|
+ if (this.case_history.temperature <= 0) {
|
|
963
|
+ this.case_history.temperature = ''
|
|
964
|
+ }
|
|
965
|
+ if (this.case_history.blood_sugar <= 0) {
|
|
966
|
+ this.case_history.blood_sugar = ''
|
|
967
|
+ }
|
|
968
|
+ if (this.case_history.pulse <= 0) {
|
|
969
|
+ this.case_history.pulse = ''
|
|
970
|
+ }
|
|
971
|
+ if (this.case_history.sbp <= 0) {
|
|
972
|
+ this.case_history.sbp = ''
|
|
973
|
+ }
|
|
974
|
+ if (this.case_history.dbp <= 0) {
|
|
975
|
+ this.case_history.dbp = ''
|
|
976
|
+ }
|
|
977
|
+ if (this.case_history.height <= 0) {
|
|
978
|
+ this.case_history.height = ''
|
|
979
|
+ }
|
|
980
|
+ if (this.case_history.blood_fat <= 0) {
|
|
981
|
+ this.case_history.blood_fat = ''
|
|
982
|
+ }
|
|
983
|
+ if (this.case_history.sick_type <= 0) {
|
|
984
|
+ this.case_history.sick_type = ''
|
|
985
|
+ }
|
|
986
|
+ this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
|
987
|
+ if (this.case_history.is_infect == 1) {
|
|
988
|
+ this.case_history.is_infect = true
|
|
989
|
+ } else {
|
|
990
|
+ this.case_history.is_infect = false
|
|
991
|
+ }
|
|
992
|
+ this.prescriptionList = response.data.data.prescription
|
|
993
|
+ if (response.data.data.prescription.length > 0) {
|
|
994
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
995
|
+ var prescription = response.data.data.prescription[i]
|
|
996
|
+ let tempAdvice = []
|
|
997
|
+ let tempProject = []
|
|
998
|
+ let tempAddition = []
|
|
999
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
1000
|
+ let obj = {
|
|
1001
|
+ advice_id: prescription.advices[b].id,
|
|
1002
|
+ drug_name: prescription.advices[b].advice_name,
|
|
1003
|
+ single_dose: prescription.advices[b].single_dose,
|
|
1004
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
1005
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
1006
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
1007
|
+ remark: prescription.advices[b].remark,
|
|
1008
|
+ day: prescription.advices[b].day,
|
|
1009
|
+ prescribing_number: prescription.advices[b].prescribing_number.toString(),
|
|
1010
|
+ single_dose_unit: prescription.advices[b].single_dose_unit,
|
|
1011
|
+ prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
|
1012
|
+ medical_insurance_number: prescription.advices[b].med_list_codg,
|
|
1013
|
+ id: prescription.advices[b].drug_id
|
|
1014
|
+ }
|
|
1015
|
+ tempAdvice.push(obj)
|
|
1016
|
+ }
|
|
1017
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
1018
|
+ let obj = {
|
|
1019
|
+ id: prescription.project[b].id,
|
|
1020
|
+ project_id: prescription.project[b].project_id,
|
|
1021
|
+ project_name: prescription.project[b].project.project_name,
|
|
1022
|
+ statistical_classification: prescription.project[b].project.statistical_classification,
|
|
1023
|
+ single_dose: prescription.project[b].single_dose,
|
|
1024
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
1025
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
1026
|
+ number_days: prescription.project[b].day,
|
|
1027
|
+ total: prescription.project[b].count.toString(),
|
|
1028
|
+ price: prescription.project[b].price,
|
|
1029
|
+ remark: prescription.project[b].remark,
|
|
1030
|
+ medical_code: prescription.project[b].project.medical_code,
|
|
1031
|
+ unit: prescription.project[b].unit
|
|
1032
|
+ }
|
|
1033
|
+ tempProject.push(obj)
|
|
1034
|
+ }
|
|
1035
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
1036
|
+ let obj = {
|
|
1037
|
+ id: prescription.addition[b].id,
|
|
1038
|
+ item_name: prescription.addition[b].item_name,
|
|
1039
|
+ price: prescription.addition[b].price,
|
|
1040
|
+ count: prescription.addition[b].count,
|
|
1041
|
+ item_id: prescription.addition[b].item_id,
|
|
1042
|
+ }
|
|
1043
|
+ tempAddition.push(obj)
|
|
1044
|
+ }
|
|
1045
|
+
|
|
1046
|
+ var preTime = ""
|
|
1047
|
+
|
|
1048
|
+ if (prescription.pre_time == 0) {
|
|
1049
|
+ preTime = nowTime
|
|
1050
|
+ } else {
|
|
1051
|
+ preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
|
1052
|
+ }
|
|
1053
|
+
|
|
1054
|
+ let index = i + 1
|
|
1055
|
+ let obj = {
|
|
1056
|
+ id: prescription.id,
|
|
1057
|
+ name: '处方' + index,
|
|
1058
|
+ advices: tempAdvice,
|
|
1059
|
+ project: tempProject,
|
|
1060
|
+ addition: tempAddition,
|
|
1061
|
+ order_status: prescription.order_status,
|
|
1062
|
+ pre_time: preTime
|
|
1063
|
+ }
|
|
1064
|
+ this.prescriptions.push(obj)
|
|
1065
|
+ }
|
|
1066
|
+ } else {
|
|
1067
|
+ let obj = {
|
|
1068
|
+ id: 0,
|
|
1069
|
+ name: '处方' + 1,
|
|
1070
|
+ advices: [],
|
|
1071
|
+ project: [],
|
|
1072
|
+ addition: [],
|
|
1073
|
+ orderStatus: 0,
|
|
1074
|
+ pre_time: nowTime,
|
|
1075
|
+ }
|
|
1076
|
+ this.prescriptions.push(obj)
|
|
1077
|
+ }
|
|
1078
|
+ this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
|
|
1079
|
+ this.$refs.child.watchSign = 0
|
|
1080
|
+ }
|
|
1081
|
+ })
|
|
1082
|
+ this.$refs.child.watchSign = 0
|
|
1083
|
+ }).catch(() => {
|
|
1084
|
+
|
|
1085
|
+ this.patientid = val.id
|
|
1086
|
+ let params = {
|
|
1087
|
+ 'record_date': this.record_date,
|
|
1088
|
+ 'patient_id': val.id,
|
|
1089
|
+ 'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
|
1090
|
+ 'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
|
|
1091
|
+ }
|
|
1092
|
+ getPatientInfo(params).then(response => {
|
|
1093
|
+ if (response.data.state == 0) {
|
|
1094
|
+ this.$message.error(response.data.msg)
|
|
1095
|
+ return false
|
|
1096
|
+ } else {
|
|
1097
|
+ this.prescriptions = []
|
|
1098
|
+
|
|
1099
|
+ this.month_prescriptions = []
|
|
1100
|
+
|
|
1101
|
+ var month_prescriptions = response.data.data.month_prescriptions
|
|
1102
|
+ this.setMonthPrescription(month_prescriptions)
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+ this.patientInfo = response.data.data.xt_info
|
|
1106
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
1107
|
+ this.case_history = response.data.data.case_history
|
|
1108
|
+ console.log("数据是22222多少",this.case_history)
|
|
1109
|
+ this.info = response.data.data.info
|
|
1110
|
+ this.doctors = response.data.data.doctors
|
|
1111
|
+ this.department = response.data.data.department
|
|
1112
|
+
|
|
1113
|
+ for (let i = 0; i < this.doctors.length; i++){
|
|
1114
|
+ if(this.doctors[i].user_type == 1){
|
|
1115
|
+ this.doctors.splice(i,1)
|
|
1116
|
+ }
|
|
1117
|
+ }
|
|
1118
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
1119
|
+ if (this.case_history.breathing <= 0) {
|
|
1120
|
+ this.case_history.breathing = ""
|
|
1121
|
+ }
|
|
1122
|
+ if (this.case_history.sick <= 0) {
|
|
1123
|
+ this.case_history.sick = ""
|
|
1124
|
+ }
|
|
1125
|
+ if (this.case_history.diagnose <= 0) {
|
|
1126
|
+ this.case_history.diagnose = ""
|
|
1127
|
+ }
|
|
1128
|
+
|
|
1129
|
+ if (this.case_history.temperature <= 0) {
|
|
1130
|
+ this.case_history.temperature = ''
|
|
1131
|
+ }
|
|
1132
|
+ if (this.case_history.blood_sugar <= 0) {
|
|
1133
|
+ this.case_history.blood_sugar = ''
|
|
1134
|
+ }
|
|
1135
|
+ if (this.case_history.pulse <= 0) {
|
|
1136
|
+ this.case_history.pulse = ''
|
|
1137
|
+ }
|
|
1138
|
+ if (this.case_history.sbp <= 0) {
|
|
1139
|
+ this.case_history.sbp = ''
|
|
1140
|
+ }
|
|
1141
|
+ if (this.case_history.dbp <= 0) {
|
|
1142
|
+ this.case_history.dbp = ''
|
|
1143
|
+ }
|
|
1144
|
+ if (this.case_history.height <= 0) {
|
|
1145
|
+ this.case_history.height = ''
|
|
1146
|
+ }
|
|
1147
|
+ if (this.case_history.blood_fat <= 0) {
|
|
1148
|
+ this.case_history.blood_fat = ''
|
|
1149
|
+ }
|
|
1150
|
+ if (this.case_history.sick_type <= 0) {
|
|
1151
|
+ this.case_history.sick_type = ''
|
|
1152
|
+ }
|
|
1153
|
+ this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
|
1154
|
+ if (this.case_history.is_infect == 1) {
|
|
1155
|
+ this.case_history.is_infect = true
|
|
1156
|
+ } else {
|
|
1157
|
+ this.case_history.is_infect = false
|
|
1158
|
+ }
|
|
1159
|
+ this.prescriptionList = response.data.data.prescription
|
|
1160
|
+ if (response.data.data.prescription.length > 0) {
|
|
1161
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
1162
|
+ var prescription = response.data.data.prescription[i]
|
|
1163
|
+ let tempAdvice = []
|
|
1164
|
+ let tempProject = []
|
|
1165
|
+ let tempAddition = []
|
|
1166
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
1167
|
+ let obj = {
|
|
1168
|
+ advice_id: prescription.advices[b].id,
|
|
1169
|
+ drug_name: prescription.advices[b].advice_name,
|
|
1170
|
+ single_dose: prescription.advices[b].single_dose,
|
|
1171
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
1172
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
1173
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
1174
|
+ remark: prescription.advices[b].remark,
|
|
1175
|
+ day: prescription.advices[b].day,
|
|
1176
|
+ prescribing_number: prescription.advices[b].prescribing_number.toString(),
|
|
1177
|
+ single_dose_unit: prescription.advices[b].single_dose_unit,
|
|
1178
|
+ prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
|
1179
|
+ medical_insurance_number: prescription.advices[b].med_list_codg,
|
|
1180
|
+ id: prescription.advices[b].drug_id
|
|
1181
|
+ }
|
|
1182
|
+ tempAdvice.push(obj)
|
|
1183
|
+ }
|
|
1184
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
1185
|
+ let obj = {
|
|
1186
|
+ id: prescription.project[b].id,
|
|
1187
|
+ project_id: prescription.project[b].project_id,
|
|
1188
|
+ project_name: prescription.project[b].project.project_name,
|
|
1189
|
+ statistical_classification: prescription.project[b].project.statistical_classification,
|
|
1190
|
+ single_dose: prescription.project[b].single_dose,
|
|
1191
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
1192
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
1193
|
+ number_days: prescription.project[b].day,
|
|
1194
|
+ total: prescription.project[b].count.toString(),
|
|
1195
|
+ price: prescription.project[b].price,
|
|
1196
|
+ remark: prescription.project[b].remark,
|
|
1197
|
+ medical_code: prescription.project[b].project.medical_code,
|
|
1198
|
+ unit: prescription.project[b].unit
|
|
1199
|
+ }
|
|
1200
|
+ tempProject.push(obj)
|
|
1201
|
+ }
|
|
1202
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
1203
|
+ let obj = {
|
|
1204
|
+ id: prescription.addition[b].id,
|
|
1205
|
+ item_name: prescription.addition[b].item_name,
|
|
1206
|
+ price: prescription.addition[b].price,
|
|
1207
|
+ count: prescription.addition[b].count,
|
|
1208
|
+ item_id: prescription.addition[b].item_id,
|
|
1209
|
+ }
|
|
1210
|
+ tempAddition.push(obj)
|
|
1211
|
+ }
|
|
1212
|
+
|
|
1213
|
+ var preTime = ""
|
|
1214
|
+
|
|
1215
|
+ if (prescription.pre_time == 0) {
|
|
1216
|
+ preTime = nowTime
|
|
1217
|
+ } else {
|
|
1218
|
+ preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
|
1219
|
+ }
|
|
1220
|
+
|
|
1221
|
+ let index = i + 1
|
|
1222
|
+ let obj = {
|
|
1223
|
+ id: prescription.id,
|
|
1224
|
+ name: '处方' + index,
|
|
1225
|
+ advices: tempAdvice,
|
|
1226
|
+ project: tempProject,
|
|
1227
|
+ addition: tempAddition,
|
|
1228
|
+ order_status: prescription.order_status,
|
|
1229
|
+ pre_time: preTime
|
|
1230
|
+ }
|
|
1231
|
+ this.prescriptions.push(obj)
|
|
1232
|
+ }
|
|
1233
|
+ } else {
|
|
1234
|
+ let obj = {
|
|
1235
|
+ id: 0,
|
|
1236
|
+ name: '处方' + 1,
|
|
1237
|
+ advices: [],
|
|
1238
|
+ project: [],
|
|
1239
|
+ addition: [],
|
|
1240
|
+ orderStatus: 0,
|
|
1241
|
+ pre_time: nowTime,
|
|
1242
|
+ }
|
|
1243
|
+ this.prescriptions.push(obj)
|
|
1244
|
+ }
|
|
1245
|
+ this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
|
|
1246
|
+ this.$refs.child.watchSign = 0
|
|
1247
|
+ }
|
|
1248
|
+ })
|
|
1249
|
+
|
|
1250
|
+ })
|
|
1251
|
+ this.$refs.child.watchSign = 0
|
|
1252
|
+ }else{
|
|
1253
|
+ this.patientid = val.id
|
|
1254
|
+ let params = {
|
|
1255
|
+ 'record_date': this.record_date,
|
|
1256
|
+ 'patient_id': val.id,
|
|
1257
|
+ 'start_time': moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
|
1258
|
+ 'end_time': moment(new Date()).add('year', 0).format("YYYY-MM-DD")
|
|
1259
|
+ }
|
|
1260
|
+ getPatientInfo(params).then(response => {
|
|
1261
|
+ if (response.data.state == 0) {
|
|
1262
|
+ this.$message.error(response.data.msg)
|
|
1263
|
+ return false
|
|
1264
|
+ } else {
|
|
1265
|
+ this.prescriptions = []
|
|
1266
|
+
|
|
1267
|
+ this.month_prescriptions = []
|
|
1268
|
+
|
|
1269
|
+ var month_prescriptions = response.data.data.month_prescriptions
|
|
1270
|
+ this.setMonthPrescription(month_prescriptions)
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+ this.patientInfo = response.data.data.xt_info
|
|
1274
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
1275
|
+ this.case_history = response.data.data.case_history
|
|
1276
|
+ console.log("数据是22222多少",this.case_history)
|
|
1277
|
+ this.info = response.data.data.info
|
|
1278
|
+ this.doctors = response.data.data.doctors
|
|
1279
|
+ this.department = response.data.data.department
|
|
1280
|
+
|
|
1281
|
+ for (let i = 0; i < this.doctors.length; i++){
|
|
1282
|
+ if(this.doctors[i].user_type == 1){
|
|
1283
|
+ this.doctors.splice(i,1)
|
|
1284
|
+ }
|
|
1285
|
+ }
|
|
1286
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
1287
|
+ if (this.case_history.breathing <= 0) {
|
|
1288
|
+ this.case_history.breathing = ""
|
|
1289
|
+ }
|
|
1290
|
+ if (this.case_history.sick <= 0) {
|
|
1291
|
+ this.case_history.sick = ""
|
|
1292
|
+ }
|
|
1293
|
+ if (this.case_history.diagnose <= 0) {
|
|
1294
|
+ this.case_history.diagnose = ""
|
|
1295
|
+ }
|
|
1296
|
+
|
|
1297
|
+ if (this.case_history.temperature <= 0) {
|
|
1298
|
+ this.case_history.temperature = ''
|
|
1299
|
+ }
|
|
1300
|
+ if (this.case_history.blood_sugar <= 0) {
|
|
1301
|
+ this.case_history.blood_sugar = ''
|
|
1302
|
+ }
|
|
1303
|
+ if (this.case_history.pulse <= 0) {
|
|
1304
|
+ this.case_history.pulse = ''
|
|
1305
|
+ }
|
|
1306
|
+ if (this.case_history.sbp <= 0) {
|
|
1307
|
+ this.case_history.sbp = ''
|
|
1308
|
+ }
|
|
1309
|
+ if (this.case_history.dbp <= 0) {
|
|
1310
|
+ this.case_history.dbp = ''
|
|
1311
|
+ }
|
|
1312
|
+ if (this.case_history.height <= 0) {
|
|
1313
|
+ this.case_history.height = ''
|
|
1314
|
+ }
|
|
1315
|
+ if (this.case_history.blood_fat <= 0) {
|
|
1316
|
+ this.case_history.blood_fat = ''
|
|
1317
|
+ }
|
|
1318
|
+ if (this.case_history.sick_type <= 0) {
|
|
1319
|
+ this.case_history.sick_type = ''
|
|
1320
|
+ }
|
|
1321
|
+ this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
|
1322
|
+ if (this.case_history.is_infect == 1) {
|
|
1323
|
+ this.case_history.is_infect = true
|
|
1324
|
+ } else {
|
|
1325
|
+ this.case_history.is_infect = false
|
|
1326
|
+ }
|
|
1327
|
+ this.prescriptionList = response.data.data.prescription
|
|
1328
|
+ if (response.data.data.prescription.length > 0) {
|
|
1329
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
1330
|
+ var prescription = response.data.data.prescription[i]
|
|
1331
|
+ let tempAdvice = []
|
|
1332
|
+ let tempProject = []
|
|
1333
|
+ let tempAddition = []
|
|
1334
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
1335
|
+ let obj = {
|
|
1336
|
+ advice_id: prescription.advices[b].id,
|
|
1337
|
+ drug_name: prescription.advices[b].advice_name,
|
|
1338
|
+ single_dose: prescription.advices[b].single_dose,
|
|
1339
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
1340
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
1341
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
1342
|
+ remark: prescription.advices[b].remark,
|
|
1343
|
+ day: prescription.advices[b].day,
|
|
1344
|
+ prescribing_number: prescription.advices[b].prescribing_number.toString(),
|
|
1345
|
+ single_dose_unit: prescription.advices[b].single_dose_unit,
|
|
1346
|
+ prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
|
1347
|
+ medical_insurance_number: prescription.advices[b].med_list_codg,
|
|
1348
|
+ id: prescription.advices[b].drug_id
|
|
1349
|
+ }
|
|
1350
|
+ tempAdvice.push(obj)
|
|
1351
|
+ }
|
|
1352
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
1353
|
+ let obj = {
|
|
1354
|
+ id: prescription.project[b].id,
|
|
1355
|
+ project_id: prescription.project[b].project_id,
|
|
1356
|
+ project_name: prescription.project[b].project.project_name,
|
|
1357
|
+ statistical_classification: prescription.project[b].project.statistical_classification,
|
|
1358
|
+ single_dose: prescription.project[b].single_dose,
|
|
1359
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
1360
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
1361
|
+ number_days: prescription.project[b].day,
|
|
1362
|
+ total: prescription.project[b].count.toString(),
|
|
1363
|
+ price: prescription.project[b].price,
|
|
1364
|
+ remark: prescription.project[b].remark,
|
|
1365
|
+ medical_code: prescription.project[b].project.medical_code,
|
|
1366
|
+ unit: prescription.project[b].unit
|
|
1367
|
+ }
|
|
1368
|
+ tempProject.push(obj)
|
|
1369
|
+ }
|
|
1370
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
1371
|
+ let obj = {
|
|
1372
|
+ id: prescription.addition[b].id,
|
|
1373
|
+ item_name: prescription.addition[b].item_name,
|
|
1374
|
+ price: prescription.addition[b].price,
|
|
1375
|
+ count: prescription.addition[b].count,
|
|
1376
|
+ item_id: prescription.addition[b].item_id,
|
|
1377
|
+ }
|
|
1378
|
+ tempAddition.push(obj)
|
|
1379
|
+ }
|
906
|
1380
|
|
|
1381
|
+ var preTime = ""
|
|
1382
|
+
|
|
1383
|
+ if (prescription.pre_time == 0) {
|
|
1384
|
+ preTime = nowTime
|
|
1385
|
+ } else {
|
|
1386
|
+ preTime = this.getTime(prescription.pre_time, "{y}-{m}-{d} {h}:{i}")
|
|
1387
|
+ }
|
|
1388
|
+
|
|
1389
|
+ let index = i + 1
|
|
1390
|
+ let obj = {
|
|
1391
|
+ id: prescription.id,
|
|
1392
|
+ name: '处方' + index,
|
|
1393
|
+ advices: tempAdvice,
|
|
1394
|
+ project: tempProject,
|
|
1395
|
+ addition: tempAddition,
|
|
1396
|
+ order_status: prescription.order_status,
|
|
1397
|
+ pre_time: preTime
|
|
1398
|
+ }
|
|
1399
|
+ this.prescriptions.push(obj)
|
|
1400
|
+ }
|
|
1401
|
+ } else {
|
|
1402
|
+ let obj = {
|
|
1403
|
+ id: 0,
|
|
1404
|
+ name: '处方' + 1,
|
|
1405
|
+ advices: [],
|
|
1406
|
+ project: [],
|
|
1407
|
+ addition: [],
|
|
1408
|
+ orderStatus: 0,
|
|
1409
|
+ pre_time: nowTime,
|
|
1410
|
+ }
|
|
1411
|
+ this.prescriptions.push(obj)
|
|
1412
|
+ }
|
|
1413
|
+ this.$refs.prescriptions.setData(this.prescriptions, this.info, this.admin_info, this.doctors, this.department,this.hisPatientInfo, this.month_prescriptions)
|
|
1414
|
+ this.$refs.child.watchSign = 0
|
|
1415
|
+ }
|
|
1416
|
+ })
|
|
1417
|
+ this.$refs.child.watchSign = 0
|
|
1418
|
+ }
|
|
1419
|
+ }else{
|
907
|
1420
|
var nowDate = new Date()
|
908
|
1421
|
var nowYear = nowDate.getFullYear()
|
909
|
1422
|
var nowMonth = nowDate.getMonth() + 1
|
|
@@ -1296,11 +1809,16 @@
|
1296
|
1809
|
|
1297
|
1810
|
|
1298
|
1811
|
}
|
|
1812
|
+ }
|
|
1813
|
+
|
1299
|
1814
|
|
1300
|
1815
|
|
|
1816
|
+
|
|
1817
|
+
|
1301
|
1818
|
},
|
1302
|
1819
|
currentChange(currentRow, oldCurrentRow) {
|
1303
|
|
-
|
|
1820
|
+ this.newPatientId = oldCurrentRow.id
|
|
1821
|
+ console.log('执行',this.newPatientId)
|
1304
|
1822
|
let isShowDailog = false
|
1305
|
1823
|
for (let i = 0; i < this.prescriptions.length; i++) {
|
1306
|
1824
|
if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
|
|
@@ -1311,7 +1829,8 @@
|
1311
|
1829
|
this.oldCurrentRow = currentRow
|
1312
|
1830
|
return
|
1313
|
1831
|
}
|
1314
|
|
-
|
|
1832
|
+
|
|
1833
|
+
|
1315
|
1834
|
|
1316
|
1835
|
}, open_two() {
|
1317
|
1836
|
this.$refs.prescriptions.open_two()
|