VistA Analysis » VistA Reference » RPCs » ORWDBA2 ADDPDL

ORWDBA2 ADDPDL

Add a new Clinician’s Personal DX List or add new ICD9 codes to an existing Clinician’s Personal DX List. The Personal DX list is stored in the CPRS Diagnosis Provider file, file # 5000017

Properties

Property Value
Label ADDPDL
MUMPS Implementation ORWDBA2
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
ORCIEN REFERENCE 255 true The clinician's internal ID number.
ORDXA REFERENCE 255 true The array variable of diagnosis codes to be added to the clinician's personal diagnoses list.

MUMPS Method Description

Property Value
Method ADDPDL^ORWDBA2
Method Comment Add to Personal Diagnosis List
Input Parameters ORCIEN, ORDXA
First Comment
Add a new personal diagnosis list or new ICD9 code to an existing
personal diagnosis list for a clinician. It will filter out duplicate
entries before updating an existing PDL.
Input Variables:
ORCIEN Clinician Internal Entry Number
ORDXA Array of dx codes to be added to personal dx list
format: ORDXA(#)=ICD9_Code^Lexicon_Expression_IEN
Output Variable:
Y Return value, 1 successful, 0 unsuccessful
Local Variables:
DXI Diagnosis Array Index
DXIEN Diagnosis Code Internal Entry Number
EM Error Message
FDXR Found Diagnoses Records Array
FDXRI Found Diagnoses Records Array Index
IEN Internal Entry Number
PDL Personal Diagnoses List Array
PDLI Personal Diagnoses List Array Index
Code
 N DXI,DXIEN,EM,FDXR,FDXRI,IEN,PDL,PDLI
D GETS^DIQ(200,ORCIEN,"351*,","","PDL","EM")
I $D(PDL) D
. S DXI="" F S DXI=$O(ORDXA(DXI)) Q:DXI="" D
.. S PDLI="" F S PDLI=$O(PDL(200.0351,PDLI)) Q:PDLI="" D
... I PDL(200.0351,PDLI,.01)=$P($G(ORDXA(DXI)),U) K ORDXA(DXI)
I $D(ORDXA)=0 S Y=0 Q
S DXI="" F S DXI=$O(ORDXA(DXI)) Q:DXI=""!($D(EM)) D
. K FDXR,EM
. ;Get the IEN for the current diagnosis code
. D FIND^DIC(80,"","","CM",$P(ORDXA(DXI),U),"*","","","","FDXR","EM")
. I $P(FDXR("DILIST",0),U)=0 Q
. I $P(FDXR("DILIST",0),U)=1 S DXIEN=FDXR("DILIST",2,1)
. I $P(FDXR("DILIST",0),U)>1 D
.. F FDXRI=1:1:FDXR("DILIST",0) D
... I FDXR("DILIST",1,FDXRI)=$P($G(ORDXA(DXI)),U) S DXIEN=FDXR("DILIST",2,FDXRI)
. ;Add IDC9 code to personal diagnoses list
. K IEN
. S IEN="1,"_ORCIEN_",",IEN="+"_IEN
. D FDA^DILF(200.0351,IEN,.01,"",DXIEN,"FDA","EM")
. D UPDATE^DIE("","FDA","IEN","EM")
. ;Add Lexicon Expression list
. I $P(ORDXA(DXI),U,2)'="" D
.. S IEN=IEN(1)_","_ORCIEN_","
.. D FDA^DILF(200.0351,IEN,1,"",$P(ORDXA(DXI),U,2),"FDA","EM")
.. D FILE^DIE("","FDA","EM")
I $D(EM) S Y=0 Q
S Y=1

CPRS

File Type Description
Pascal File BA/UBACore.pas


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