Update index.js
This commit is contained in:
parent
8125e9d4e6
commit
7f250d0668
@ -1050,7 +1050,8 @@ async function auditDiagnosis(item, db) {
|
||||
// 4. 根据分组 分别处理
|
||||
if (passList.length) {
|
||||
let successRxList = [];
|
||||
const uploadResult = await Promise.all(passList.map(i => uploadRx2His(i.rx, i.order)));
|
||||
const auditTime = Date.now();
|
||||
const uploadResult = await Promise.all(passList.map(i => uploadRx2His({ ...i.rx, auditTime }, i.order)));
|
||||
uploadResult.forEach(i => {
|
||||
if (i.success) {
|
||||
const rx = passList.find(j => j.rx._id.toString() === i.id.toString());
|
||||
@ -1069,7 +1070,7 @@ async function auditDiagnosis(item, db) {
|
||||
$set: {
|
||||
uploadStatus: "uploaded",
|
||||
status: status.pass,
|
||||
auditTime: Date.now(),
|
||||
auditTime,
|
||||
pharmacistSignImg: pharmacistCAUserId,
|
||||
auditSource
|
||||
}
|
||||
@ -1143,9 +1144,6 @@ async function auditDiagnosis(item, db) {
|
||||
async function uploadRx2His(rx, order) {
|
||||
try {
|
||||
const uploadData = formatUploadRxData(rx, order);
|
||||
console.log('='.repeat(10))
|
||||
console.log('='.repeat(10))
|
||||
console.log(JSON.stringify(uploadData))
|
||||
const { success, message } = await hnHis({
|
||||
type: 'hlwuploadprescription',
|
||||
data: uploadData
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user