Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RECORD.DATA
- OE.ORD.urn+.001^OE.ORD.urn,
- @Est.t.rec(x,OE.ORD.main,""),
- A^@OE.ORD.main,
- @BUILD.REPORT.INDEX,
- @Move(@t.screens,@OE.ORD.screens),
- ""^query,K(/QRY),
- DO{+PATQRY[query]^query IF{@t.responses M(@t.responses,/QRY[query])}},
- IF{+/QRY[""] %OE.PAT.load.queries(""),%MIS.SCREEN.pat.file("",^/QRY)},
- IF{"D"'=@t.cat.type;
- IF{@t.response[@OE.PARAM.diet.end.date.qry]^XX XX^@OE.ORD.diet.end.date^OE.ORD.diet.end.date,
- IF{@t.response[@OE.PARAM.diet.end.time.qry];2359}^YY,
- YY^@OE.ORD.diet.end.time^OE.ORD.diet.end.time,
- 1^@OE.ORD.diet.end.x}},
- IF{@t.response[@OE.PARAM.consultation.doctor]^XX IF{@Locked(@ADM.PAT.main)^LK "Record locked.. waiting"_" ["_%Z.date.out(LK|2)_" "_%Z.time.out(LK|3)_" on "_LK|0_" by "_IF{@UNV.USER.name[LK|4];LK|4}_"]"^LOCK,
- %Z.fs.write.network(LOCK)},
- %ADM.PAT.file.consulting.doctor(patient,XX,@t.service.date)},
- IF{@t.response[@OE.PARAM.hold.spec.query]'="Y" 1^@OE.ORD.unc.x,"Y"^@OE.ORD.uncollected^@OE.ORD.unc.at.ord},
- IF{@INTERFACED.TO.LAB IF{@LAB.PARAM.oe.priority.qry^query_.=.;
- @First(OE.PARAM.lab.priority)_.=.;
- @OE.ORD.response;
- @t.priority^@OE.ORD.response}},
- IF{@t.dup.reason @t.dup.reason^@OE.ORD.dup.reason,
- 1^@OE.ORD.dup.x[category,@t.service.date,OE.ORD.urn]},
- IF{@t.order.set.and.series.data @t.order.set.and.series.data^@OE.ORD.order.set.and.series.data},
- 1^@OE.ORD.status.comp.x[@t.status,OE.ORD.urn]^@OE.ORD.ord.date.x[@.today,OE.ORD.urn],
- 1^@OE.ORD.svc.date.x[@t.service.date,OE.ORD.urn]^@OE.ORD.cat.svc.x[category,@t.service.date,OE.ORD.urn],
- 1^@OE.ORD.cat.proc.x[category,@OE.PROC.mnemonic,OE.ORD.urn]^@OE.ORD.provider.x[@t.doctor,OE.ORD.urn],
- 1^@OE.ORD.edit.urn,
- Q(TDY,TIM,@.user,"order entered in Order Management",@t.device)^@OE.ORD.edit.data,
- IF{@OE.ORD.entry.site;/(.D)OE.SITE^@OE.ORD.entry.site},
- @CALCULATE.REVIEW.DATE.AND.SET.INDEX,
- c.source^@OE.ORD.source,
- IF{'@t.icd.data;
- %OE.ORD.med.nec.to.adm(^@Root(@t.icd.data),"",{OE.ORD.urn,@t.patient,@t.service.date},@OE.ORD.main),
- G(@t.icd.data,@OE.ORD.icd.data)},
- ; associated index files
- IF{@t.cat.type="S" @GET.STOCK.LOCATION,
- IF{@t.quantity;1^@OE.ORD.quantity},
- IF{@t.patient;1^@OE.ORD.stock.x},
- @QUEUE.FOR.MM;
- @t.cat.type="P" IF{@OE.PROC.payment.type#0="A";
- 1^@OE.ORD.cash.x[@t.user,@t.order.date,@t.order.time,OE.ORD.urn]},
- IF{@OE.PROC.payment.type#0="G" @t.amount^@OE.ORD.gl.amount}},
- IF{"NUR"'=@OE.CAT.interface[@t.category];
- @Move(@Root(@t.nursing.text),@Root(@OE.ORD.nursing.text)),
- @Move(@Root(@t.nur.dir),@Root(@OE.ORD.nur.dir))},
- @FILE.PHA.INT.DATA,
- IF{@t.pha.pcs M(@t.pha.pcs,@OE.ORD.pha.pcs),
- M(@t.pha.request.data,@OE.ORD.pha.request.data),
- M(@Root(@t.pha.tapers),@Root(@OE.ORD.pha.tapers)),
- M(@Root(@t.pha.pcs.protocol),@Root(@OE.ORD.pha.pcs.protocol)),
- M(@Root(@t.pha.pcs.protocol.text),@Root(@OE.ORD.pha.pcs.protocol.text)),
- M(@Root(@t.pha.pcs.rx.comments),@Root(@OE.ORD.pha.pcs.rx.comments)),
- M(@Root(@t.pha.pcs.prep.inst),@Root(@OE.ORD.pha.pcs.prep.inst)),
- M(@Root(@t.pha.pcs.iv.add.bsa),@Root(@OE.ORD.pha.pcs.iv.add.bsa)),
- M(@t.pom.iv.stop,@OE.ORD.pom.iv.stop),
- M(@Root(@t.pha.tpn.data),@Root(@OE.ORD.pha.tpn.data)),
- IF{@t.tpn.urn!@t.tpn.fat.urn OE.ORD.urn^TPNLINK[order.urn]},
- M(@Root(@t.pha.trans.sch.data),@Root(@OE.ORD.pha.trans.sch.data)),
- M(@Root(@t.pha.trans.comments),@Root(@OE.ORD.pha.trans.comments)),
- %OE.INP.pcs.file.M.pha.lite(urn,order.urn,OE.ORD.urn),
- M(@Root(@t.pha.pcs.lite),@Root(@OE.ORD.pha.pcs.lite))},
- @RECORD.RULES,
- IF{'patient;
- @PATIENT.RECORD,
- @SAVE.ELEC.SIG.DATA},
- G(@OE.ORD.main,@p.OE.ORD.main),
- IF{@STAT "S"^OE.ORD.sb.activity,
- IF{@OE.CAT.type[@OE.ORD.category]'="Stock"'="Payment" 1^@OE.ORD.sb.activity.x^@OE.ORD.sb.orders.x}},
- IF{'patient;
- @SETUP.HUB.QUEUE,
- @QUEUE.FOR.WEB,
- @QUEUE.FOR.EDM,
- %OE.ORD.pom.lite(OE.ORD.urn),
- @COMPLETE.OLD.DIETS.IF.NECESSARY,
- +[^@t.pending.clin.alerts[urn,order.urn]^CAF,""]_.=.;
- @FILE.PENDING.CLINICAL.ALERTS},
- @QUEUE.FOR.SCH,
- @Clr.t.rec(x),
- ^/[patient]%3^SUB,
- {"Y","",^@OE.PAT.main}^@DR.MIS.tmp.optionals[@Pgm.name(""),"OE.PAT","main",SUB],
- ^/[OE.ORD.urn]%3^SUB,
- {"Y","",^@OE.ORD.main}^@DR.MIS.tmp.optionals[@Pgm.name(""),"OE.ORD","main",SUB],
- %Z.dr.image("A","",@Pgm.name(""),"OE","","","NONE"),
- 1^@OE.ORD.urn.x,
- IF{@OE.ORD.review.date @MAYBE.QUEUE.FOR.PWM},
- IF{Q.RENEW ""^Q.RENEW,
- %OE.ORD.elec.sig.index(OE.ORD.urn,"I","","","Renew order for "_%Z.date.out(RDT),"R"),
- /OE.ORD.sig.urn^@OE.ORD.renewable.x[patient,RDT,OE.ORD.urn]},
- IF{"U"=@t.status;
- ; Sent to OUTBOX by OE.PRT.process.ord
- @QUEUE.TO.SEND}
Add Comment
Please, Sign In to add comment