VistA Analysis » VistA Reference » RPCs » ORWDBA1 RCVORCI

ORWDBA1 RCVORCI

Receive Order Entry Billing Aware data from CPRS.

Properties

Property Value
Label RCVORCI
MUMPS Implementation ORWDBA1
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
DIAG LIST 255 true Array of Orders and Clinical Indicators returned from CPRS

MUMPS Method Description

Property Value
Method RCVORCI^ORWDBA1
Method Comment Receive order related Clinical Indicators & Diagnoses from GUI
Input Parameters DIAG
First Comment
 Store data in ^OR(100,ODN,5.1) & ^OR(100,0DN,5.2)
Code
 N DXIEN,ODN,ORIEN,SCI,OCDXCT,OCT
S ODN="",OCDXCT=0,Y=""
F S ODN=$O(DIAG(ODN)) Q:ODN="" D
. S ORIEN=$P(DIAG(ODN),";",1) ;Order IEN
. I ORIEN'?1N.N S Y=0 Q
. K ^OR(100,ORIEN,5.1) ;Clear currently stored diagnosis for rewrite
. ; Data from Delphi format: ORIEN;11CNNNCNN^exDx1^exDx2^exDx3^exDx4
. ; Convert 8 Tx Factors
. S SCI=$$TFGUIGBL($RE($E($RE($P(DIAG(ODN),U)),1,8)))
. S ^OR(100,ORIEN,5.2)=SCI ;Store TFs (SC,MST,AO,IR,EC,HNC,CV,SHD)
. ; Get order date for CSV/CTD/HIPAA
. S ORFMDAT=$$ORFMDAT^ORWDBA3(ORIEN)
. ; Go through the diagnoses entered
. F OCT=2:1 Q:$P(DIAG(ODN),U,OCT)="" D
.. S DXIEN=$P($$ICDDATA^ICDXCODE("DIAGNOSIS",$P(DIAG(ODN),U,OCT),ORFMDAT),U,1) ;Dx IEN
.. I DXIEN=-1!(DXIEN="") Q ;No or invalid code passed in
.. S OCDXCT=OCDXCT+1
.. S ^OR(100,ORIEN,5.1,0)="^100.051PA^"_OCDXCT_U_OCDXCT ;Set 5.1 zero node
.. S ^OR(100,ORIEN,5.1,OCDXCT,0)=DXIEN ;Store a diagnosis for order
.. S ^OR(100,ORIEN,5.1,"B",DXIEN,OCDXCT)="" ;Index diagnosis for order
S:Y="" Y=1

CPRS

File Type Description
Pascal File BA/UBACore.pas


Document generated on August 31st 2022, 2:55:43 pm