RMPRHL7B ;HINES/HNC - Process order parameters set file 668 ;3-21-00 ;;3.0;PROSTHETICS;**45,52,62,78**;Feb 09, 1996 ; ; ODJ - patch 52 - 10/13/00 - remove leading blank lines from ; consult text ; RVD - patch 62 - update ICD9 field from the HL7 message. ; TH - patch 78 - 09/26/03 - update ICD9 codes, value for each SC and ; EI. ; NEW ;Create new suspense ; ;RMPRO=^RMPR(668,IFN, the new file number in file ^RMPR(668, ;RMPRORFN=OE/RR file number (pointer to Order file) ;RMPRWARD=ward patient is on ;RMPRSS=type of consult ;RMPRAD=date/time of request ;RMPRPRI=procedure/request ;RMPRURGI=urgency POINTER 101 TO FREE T ;RMPRORNP=patient's ordering provider ;RMPRTYPE=request type (request or consult) ;RMPRSBR=service rendered on what basis (Inpatient, or Outpatient) ;RMPRRFQ=reason for request array - word processing fields ;RMPRPRDG=provisional DX ;RMPRPRCD=provisional DX code ; ; ;next 4 lines added by patch #62 S RMPRIECD="" I $D(RMPRPRCD),RMPRPRCD'="" D .S RMPRIECD=$O(^ICD9("BA",RMPRPRCD,0)) .I '$G(RMPRIECD) S RMPRIECD=$O(^ICD9("BA",RMPRPRCD_" ",0)) ; next 5 lines added by patch #78 ; override previous Provisional Diagnosis code with first BA code I $D(RMPRMSG1(1,1)) S RMPRPRCD=$$GET1^DIQ(80,RMPRMSG1(1,1)_",",.01),RMPRIECD=RMPRMSG1(1,1) I '$G(RMPRIECD) D . N RMLP F RMLP=2:1:4 I $D(RMPRMSG1(RMLP,1)) S RMPRPRCD=$$GET1^DIQ(RMPRMSG1(RMLP,1)_",",.01),RMPRIECD=RMPRMSG1(RMLP,1) Q ; N DIC,DLAYGO,X,DR,DIE S DIC="^RMPR(668,",DIC(0)="L",X="""N""",DLAYGO=668 D ^DIC K DLAYGO Q:Y<1 S (DA,RMPRO)=+Y,DIE=DIC ; L +^RMPR(668,RMPRO) ; .01-Suspense date;22-Date RX written S DR=".01////^S X=RMPRAD;22////^S X=RMPRAD" ; 1-Veteran;19-CPRS order #;2-station;9-Type or request;2.3-Urgency ; 30-Consult Visit# S DR=DR_";1////^S X=DFN;19////^S X=RMPRORFN;2////^S X=RMPRFAC;9////^S X=RMPRSS;2.3////^S X=RMPRURGI;30////^S X=VISIT" D ^DIE ; ; 8-Suspense by (ordering provider);14-Status (O=Open); ; 3-Suspense form (9=for other);13-Requestor (ordering provider) ; 1.5-Provisional Diagnosis;1.6-ICD9 S DR="8////^S X=RMPRORNP;14////^S X=""O"";3////^S X=9;13////^S X=RMPRORNP;1.5////^S X=$G(RMPRPRDG);1.6////^S X=$G(RMPRIECD)" D ^DIE ; ; Patch 78: Update ICD9 and value of each SC and EI. S RMPRMAX=8 ; ao - cv F RMPRI=1:1:99 Q:'$D(RMPRMSG1(RMPRI)) S DR="" D . F RMPRJ=1:1:RMPRMAX S RMVALUE=$G(RMPRMSG1(RMPRI,RMPRJ)) D . . S DR=DR_"3"_(RMPRI-1)_$S(RMPRJ>1:"."_(RMPRJ-1),1:"")_"////^S X=" . . S DR=DR_$S(RMVALUE="":"""""",1:RMVALUE)_$S(RMPRJ