GMRAPENC ;SLC/JMH - Pharmacy API calls ;1/7/08 09:38
;;4.0;Adverse Reaction Tracking;**41**;Mar 29, 1996;Build 8
;
;$$DRP2CLP^GMRAPENC(50 IEN) => 50.605 IEN
;$$CODE2CLP^GMRAPENC(DRUG CLASS CODE) => 50.605 IEN
;$$CODE2CL^GMRAPENC(DRUG CLASS CODE) => 50.605 CLASS NAME
;$$DRP2CODE^GMRAPENC(50 IEN) => 50.605 CLASS CODE
;$$CLP2CODE^GMRAPENC(50.605 IEN) => 50.605 CLASS CODE
;$$CLP2CLDA^GMRAPENC(50.605 IEN) => 50.605 CLASS CODE ^ 50.605 CLASSIFICATION
;$$INP2INNA^GMRAPENC(50.416 IEN) => 50.416 INGREDIENT NAME
;
DRP2CLP(GMRAIEN) ;
;GMRAIEN = FILE 50 POINTER
;RETURN = FILE 50.605 POINTER
N GMRARET
K ^TMP($J,"GMRADATA")
D DATA^PSS50(GMRAIEN,,,,,"GMRADATA")
S GMRARET=+$G(^TMP($J,"GMRADATA",GMRAIEN,25))
K ^TMP($J,"GMRADATA")
Q GMRARET
CODE2CLP(GMRACODE) ;
;GMRACODE = DRUG CLASS CODE
;RETURN = FILE 50.605 POINTER
N GMRARET
K ^TMP($J,"GMRADATA")
D IEN^PSN50P65(,GMRACODE,"GMRADATA")
S GMRARET=$O(^TMP($J,"GMRADATA","B",GMRACODE,""))
K ^TMP($J,"GMRADATA")
Q GMRARET
CODE2CL(GMRACODE) ;
;GMRACODE = DRUG CLASS CODE
;RETURN = DRUG CLASS NAME
N GMRARET
K ^TMP($J,"GMRADATA")
D IEN^PSN50P65(,GMRACODE,"GMRADATA")
S GMRARET=$O(^TMP($J,"GMRADATA","B",GMRACODE,""))
I GMRARET S GMRARET=$G(^TMP($J,"GMRADATA",GMRARET,1))
K ^TMP($J,"GMRADATA")
Q GMRARET
DRP2CODE(GMRAIEN) ;
;GMRAIEN = FILE 50 POINTER
;RETURN = DRUG CLASS CODE
N GMRARET
K ^TMP($J,"GMRADATA")
D DATA^PSS50(GMRAIEN,,,,,"GMRADATA")
S GMRARET=$P($G(^TMP($J,"GMRADATA",GMRAIEN,25)),U,2)
K ^TMP($J,"GMRADATA")
Q GMRARET
CLP2CODE(GMRAIEN) ;
;GMRAIEN = FILE 50.605 POINTER
;RETURN = DRUG CLASS CODE
N GMRARET
K ^TMP($J,"GMRADATA")
D C^PSN50P65(GMRAIEN,,"GMRADATA")
S GMRARET=$G(^TMP($J,"GMRADATA",GMRAIEN,.01))
K ^TMP($J,"GMRADATA")
Q GMRARET
CLP2CLDA(GMRAIEN) ;
;GMRAIEN = FILE 50.605 POINTER
;RETURN = DRUG CLASS CODE^DRUG CLASS CLASSIFICATION
N GMRARET
K ^TMP($J,"GMRADATA")
D C^PSN50P65(GMRAIEN,,"GMRADATA")
S GMRARET=$G(^TMP($J,"GMRADATA",GMRAIEN,.01))_U_$G(^TMP($J,"GMRADATA",GMRAIEN,1))
K ^TMP($J,"GMRADATA")
Q GMRARET
INP2INNA(GMRAIEN) ;
;GMRAIEN = FILE 50.416 POINTER
;RETURN = DRUG INGREDIENT NAME
N GMRARET
K ^TMP($J,"GMRADATA")
D ZERO^PSN50P41(GMRAIEN,,,"GMRADATA")
S GMRARET=$G(^TMP($J,"GMRADATA",GMRAIEN,.01))
K ^TMP($J,"GMRADATA")
Q GMRARET
GMRAPENC ;SLC/JMH - Pharmacy API calls ;1/7/08 09:38
+1 ;;4.0;Adverse Reaction Tracking;**41**;Mar 29, 1996;Build 8
+2 ;
+3 ;$$DRP2CLP^GMRAPENC(50 IEN) => 50.605 IEN
+4 ;$$CODE2CLP^GMRAPENC(DRUG CLASS CODE) => 50.605 IEN
+5 ;$$CODE2CL^GMRAPENC(DRUG CLASS CODE) => 50.605 CLASS NAME
+6 ;$$DRP2CODE^GMRAPENC(50 IEN) => 50.605 CLASS CODE
+7 ;$$CLP2CODE^GMRAPENC(50.605 IEN) => 50.605 CLASS CODE
+8 ;$$CLP2CLDA^GMRAPENC(50.605 IEN) => 50.605 CLASS CODE ^ 50.605 CLASSIFICATION
+9 ;$$INP2INNA^GMRAPENC(50.416 IEN) => 50.416 INGREDIENT NAME
+10 ;
DRP2CLP(GMRAIEN) ;
+1 ;GMRAIEN = FILE 50 POINTER
+2 ;RETURN = FILE 50.605 POINTER
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO DATA^PSS50(GMRAIEN,,,,,"GMRADATA")
+6 SET GMRARET=+$GET(^TMP($JOB,"GMRADATA",GMRAIEN,25))
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET
CODE2CLP(GMRACODE) ;
+1 ;GMRACODE = DRUG CLASS CODE
+2 ;RETURN = FILE 50.605 POINTER
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO IEN^PSN50P65(,GMRACODE,"GMRADATA")
+6 SET GMRARET=$ORDER(^TMP($JOB,"GMRADATA","B",GMRACODE,""))
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET
CODE2CL(GMRACODE) ;
+1 ;GMRACODE = DRUG CLASS CODE
+2 ;RETURN = DRUG CLASS NAME
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO IEN^PSN50P65(,GMRACODE,"GMRADATA")
+6 SET GMRARET=$ORDER(^TMP($JOB,"GMRADATA","B",GMRACODE,""))
+7 IF GMRARET
SET GMRARET=$GET(^TMP($JOB,"GMRADATA",GMRARET,1))
+8 KILL ^TMP($JOB,"GMRADATA")
+9 QUIT GMRARET
DRP2CODE(GMRAIEN) ;
+1 ;GMRAIEN = FILE 50 POINTER
+2 ;RETURN = DRUG CLASS CODE
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO DATA^PSS50(GMRAIEN,,,,,"GMRADATA")
+6 SET GMRARET=$PIECE($GET(^TMP($JOB,"GMRADATA",GMRAIEN,25)),U,2)
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET
CLP2CODE(GMRAIEN) ;
+1 ;GMRAIEN = FILE 50.605 POINTER
+2 ;RETURN = DRUG CLASS CODE
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO C^PSN50P65(GMRAIEN,,"GMRADATA")
+6 SET GMRARET=$GET(^TMP($JOB,"GMRADATA",GMRAIEN,.01))
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET
CLP2CLDA(GMRAIEN) ;
+1 ;GMRAIEN = FILE 50.605 POINTER
+2 ;RETURN = DRUG CLASS CODE^DRUG CLASS CLASSIFICATION
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO C^PSN50P65(GMRAIEN,,"GMRADATA")
+6 SET GMRARET=$GET(^TMP($JOB,"GMRADATA",GMRAIEN,.01))_U_$GET(^TMP($JOB,"GMRADATA",GMRAIEN,1))
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET
INP2INNA(GMRAIEN) ;
+1 ;GMRAIEN = FILE 50.416 POINTER
+2 ;RETURN = DRUG INGREDIENT NAME
+3 NEW GMRARET
+4 KILL ^TMP($JOB,"GMRADATA")
+5 DO ZERO^PSN50P41(GMRAIEN,,,"GMRADATA")
+6 SET GMRARET=$GET(^TMP($JOB,"GMRADATA",GMRAIEN,.01))
+7 KILL ^TMP($JOB,"GMRADATA")
+8 QUIT GMRARET