Guest User

Untitled

a guest
May 11th, 2018
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.11 KB | None | 0 0
  1. RECORD.DATA
  2. OE.ORD.urn+.001^OE.ORD.urn,
  3. @Est.t.rec(x,OE.ORD.main,""),
  4. A^@OE.ORD.main,
  5. @BUILD.REPORT.INDEX,
  6. @Move(@t.screens,@OE.ORD.screens),
  7. ""^query,K(/QRY),
  8. DO{+PATQRY[query]^query IF{@t.responses M(@t.responses,/QRY[query])}},
  9. IF{+/QRY[""] %OE.PAT.load.queries(""),%MIS.SCREEN.pat.file("",^/QRY)},
  10. IF{"D"'=@t.cat.type;
  11. IF{@t.response[@OE.PARAM.diet.end.date.qry]^XX XX^@OE.ORD.diet.end.date^OE.ORD.diet.end.date,
  12. IF{@t.response[@OE.PARAM.diet.end.time.qry];2359}^YY,
  13. YY^@OE.ORD.diet.end.time^OE.ORD.diet.end.time,
  14. 1^@OE.ORD.diet.end.x}},
  15. 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,
  16. %Z.fs.write.network(LOCK)},
  17. %ADM.PAT.file.consulting.doctor(patient,XX,@t.service.date)},
  18. IF{@t.response[@OE.PARAM.hold.spec.query]'="Y" 1^@OE.ORD.unc.x,"Y"^@OE.ORD.uncollected^@OE.ORD.unc.at.ord},
  19. IF{@INTERFACED.TO.LAB IF{@LAB.PARAM.oe.priority.qry^query_.=.;
  20. @First(OE.PARAM.lab.priority)_.=.;
  21. @OE.ORD.response;
  22. @t.priority^@OE.ORD.response}},
  23. IF{@t.dup.reason @t.dup.reason^@OE.ORD.dup.reason,
  24. 1^@OE.ORD.dup.x[category,@t.service.date,OE.ORD.urn]},
  25. IF{@t.order.set.and.series.data @t.order.set.and.series.data^@OE.ORD.order.set.and.series.data},
  26. 1^@OE.ORD.status.comp.x[@t.status,OE.ORD.urn]^@OE.ORD.ord.date.x[@.today,OE.ORD.urn],
  27. 1^@OE.ORD.svc.date.x[@t.service.date,OE.ORD.urn]^@OE.ORD.cat.svc.x[category,@t.service.date,OE.ORD.urn],
  28. 1^@OE.ORD.cat.proc.x[category,@OE.PROC.mnemonic,OE.ORD.urn]^@OE.ORD.provider.x[@t.doctor,OE.ORD.urn],
  29. 1^@OE.ORD.edit.urn,
  30. Q(TDY,TIM,@.user,"order entered in Order Management",@t.device)^@OE.ORD.edit.data,
  31. IF{@OE.ORD.entry.site;/(.D)OE.SITE^@OE.ORD.entry.site},
  32. @CALCULATE.REVIEW.DATE.AND.SET.INDEX,
  33. c.source^@OE.ORD.source,
  34. IF{'@t.icd.data;
  35. %OE.ORD.med.nec.to.adm(^@Root(@t.icd.data),"",{OE.ORD.urn,@t.patient,@t.service.date},@OE.ORD.main),
  36. G(@t.icd.data,@OE.ORD.icd.data)},
  37. ; associated index files
  38. IF{@t.cat.type="S" @GET.STOCK.LOCATION,
  39. IF{@t.quantity;1^@OE.ORD.quantity},
  40. IF{@t.patient;1^@OE.ORD.stock.x},
  41. @QUEUE.FOR.MM;
  42. @t.cat.type="P" IF{@OE.PROC.payment.type#0="A";
  43. 1^@OE.ORD.cash.x[@t.user,@t.order.date,@t.order.time,OE.ORD.urn]},
  44. IF{@OE.PROC.payment.type#0="G" @t.amount^@OE.ORD.gl.amount}},
  45. IF{"NUR"'=@OE.CAT.interface[@t.category];
  46. @Move(@Root(@t.nursing.text),@Root(@OE.ORD.nursing.text)),
  47. @Move(@Root(@t.nur.dir),@Root(@OE.ORD.nur.dir))},
  48. @FILE.PHA.INT.DATA,
  49. IF{@t.pha.pcs M(@t.pha.pcs,@OE.ORD.pha.pcs),
  50. M(@t.pha.request.data,@OE.ORD.pha.request.data),
  51. M(@Root(@t.pha.tapers),@Root(@OE.ORD.pha.tapers)),
  52. M(@Root(@t.pha.pcs.protocol),@Root(@OE.ORD.pha.pcs.protocol)),
  53. M(@Root(@t.pha.pcs.protocol.text),@Root(@OE.ORD.pha.pcs.protocol.text)),
  54. M(@Root(@t.pha.pcs.rx.comments),@Root(@OE.ORD.pha.pcs.rx.comments)),
  55. M(@Root(@t.pha.pcs.prep.inst),@Root(@OE.ORD.pha.pcs.prep.inst)),
  56. M(@Root(@t.pha.pcs.iv.add.bsa),@Root(@OE.ORD.pha.pcs.iv.add.bsa)),
  57. M(@t.pom.iv.stop,@OE.ORD.pom.iv.stop),
  58. M(@Root(@t.pha.tpn.data),@Root(@OE.ORD.pha.tpn.data)),
  59. IF{@t.tpn.urn!@t.tpn.fat.urn OE.ORD.urn^TPNLINK[order.urn]},
  60. M(@Root(@t.pha.trans.sch.data),@Root(@OE.ORD.pha.trans.sch.data)),
  61. M(@Root(@t.pha.trans.comments),@Root(@OE.ORD.pha.trans.comments)),
  62. %OE.INP.pcs.file.M.pha.lite(urn,order.urn,OE.ORD.urn),
  63. M(@Root(@t.pha.pcs.lite),@Root(@OE.ORD.pha.pcs.lite))},
  64. @RECORD.RULES,
  65. IF{'patient;
  66. @PATIENT.RECORD,
  67. @SAVE.ELEC.SIG.DATA},
  68. G(@OE.ORD.main,@p.OE.ORD.main),
  69. IF{@STAT "S"^OE.ORD.sb.activity,
  70. IF{@OE.CAT.type[@OE.ORD.category]'="Stock"'="Payment" 1^@OE.ORD.sb.activity.x^@OE.ORD.sb.orders.x}},
  71. IF{'patient;
  72. @SETUP.HUB.QUEUE,
  73. @QUEUE.FOR.WEB,
  74. @QUEUE.FOR.EDM,
  75. %OE.ORD.pom.lite(OE.ORD.urn),
  76. @COMPLETE.OLD.DIETS.IF.NECESSARY,
  77. +[^@t.pending.clin.alerts[urn,order.urn]^CAF,""]_.=.;
  78. @FILE.PENDING.CLINICAL.ALERTS},
  79. @QUEUE.FOR.SCH,
  80. @Clr.t.rec(x),
  81. ^/[patient]%3^SUB,
  82. {"Y","",^@OE.PAT.main}^@DR.MIS.tmp.optionals[@Pgm.name(""),"OE.PAT","main",SUB],
  83. ^/[OE.ORD.urn]%3^SUB,
  84. {"Y","",^@OE.ORD.main}^@DR.MIS.tmp.optionals[@Pgm.name(""),"OE.ORD","main",SUB],
  85. %Z.dr.image("A","",@Pgm.name(""),"OE","","","NONE"),
  86. 1^@OE.ORD.urn.x,
  87. IF{@OE.ORD.review.date @MAYBE.QUEUE.FOR.PWM},
  88. IF{Q.RENEW ""^Q.RENEW,
  89. %OE.ORD.elec.sig.index(OE.ORD.urn,"I","","","Renew order for "_%Z.date.out(RDT),"R"),
  90. /OE.ORD.sig.urn^@OE.ORD.renewable.x[patient,RDT,OE.ORD.urn]},
  91. IF{"U"=@t.status;
  92. ; Sent to OUTBOX by OE.PRT.process.ord
  93. @QUEUE.TO.SEND}
Add Comment
Please, Sign In to add comment