SCMCHLA2 ;ALB/KCL - PCMM HL7 Error Code & ID File API'S ;25-JAN-2000
;;5.3;Scheduling;**210**;AUG 13, 1993
;
GETEC(SCIEN,SCEC) ;
; Description: Used to obtain a record from the PCMM HL7 ERROR CODE
; (#404.472) file and place it into the local SCECODE array.
;
; Input :
; SCIEN - IEN of a PCMM HL7 ERROR CODE record
;
; Output:
; Function Value - returns 1 on success, 0 on failure.
; SCECODE - if succes, the name of local array containing the record,
; passed by reference.
;
; subscript field name
; --------- ----------
; "CODE" Error Code
; "SEG" Segment
; "FLD" Field
; "SHORT" Short Description
;
N NODE
;
I '$G(SCIEN) Q 0
I '$D(^SCPT(404.472,SCIEN,0)) Q 0
;
K SCECODE S SCECODE=""
S NODE=$G(^SCPT(404.472,SCIEN,0))
S SCEC("CODE")=$P(NODE,"^")
S SCEC("SEG")=$P(NODE,"^",2)
S SCEC("FLD")=$P(NODE,"^",3)
S SCEC("SHORT")=$P(NODE,"^",4)
Q 1
;
;
GETHL7ID(SCIEN,SCHLID) ;
; Description: Used to obtain a record from the PCMM HL7 ID
; file and place it into the local SCHLID array.
;
; Input :
; SCIEN - IEN of a PCMM HL7 ID record
;
; Output:
; Function Value - returns 1 on success, 0 on failure.
; SCHID - if succes, the name of local array containing the record,
; passed by reference.
;
; subscript field name
; --------- ----------
; "HL7ID" Name
; "INTID" Integration ID
;
N SUB,NODE
;
I '$G(SCIEN) Q 0
I '$D(^SCPT(404.49,SCIEN,0)) Q 0
K SCHLID S SCHLID=""
S NODE=$G(^SCPT(404.49,SCIEN,0))
S SCHLID("HL7ID")=$P(NODE,"^")
S SCHLID("INTID")=$P(NODE,"^",2)
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCMCHLA2 1727 printed Dec 13, 2024@02:40:23 Page 2
SCMCHLA2 ;ALB/KCL - PCMM HL7 Error Code & ID File API'S ;25-JAN-2000
+1 ;;5.3;Scheduling;**210**;AUG 13, 1993
+2 ;
GETEC(SCIEN,SCEC) ;
+1 ; Description: Used to obtain a record from the PCMM HL7 ERROR CODE
+2 ; (#404.472) file and place it into the local SCECODE array.
+3 ;
+4 ; Input :
+5 ; SCIEN - IEN of a PCMM HL7 ERROR CODE record
+6 ;
+7 ; Output:
+8 ; Function Value - returns 1 on success, 0 on failure.
+9 ; SCECODE - if succes, the name of local array containing the record,
+10 ; passed by reference.
+11 ;
+12 ; subscript field name
+13 ; --------- ----------
+14 ; "CODE" Error Code
+15 ; "SEG" Segment
+16 ; "FLD" Field
+17 ; "SHORT" Short Description
+18 ;
+19 NEW NODE
+20 ;
+21 IF '$GET(SCIEN)
QUIT 0
+22 IF '$DATA(^SCPT(404.472,SCIEN,0))
QUIT 0
+23 ;
+24 KILL SCECODE
SET SCECODE=""
+25 SET NODE=$GET(^SCPT(404.472,SCIEN,0))
+26 SET SCEC("CODE")=$PIECE(NODE,"^")
+27 SET SCEC("SEG")=$PIECE(NODE,"^",2)
+28 SET SCEC("FLD")=$PIECE(NODE,"^",3)
+29 SET SCEC("SHORT")=$PIECE(NODE,"^",4)
+30 QUIT 1
+31 ;
+32 ;
GETHL7ID(SCIEN,SCHLID) ;
+1 ; Description: Used to obtain a record from the PCMM HL7 ID
+2 ; file and place it into the local SCHLID array.
+3 ;
+4 ; Input :
+5 ; SCIEN - IEN of a PCMM HL7 ID record
+6 ;
+7 ; Output:
+8 ; Function Value - returns 1 on success, 0 on failure.
+9 ; SCHID - if succes, the name of local array containing the record,
+10 ; passed by reference.
+11 ;
+12 ; subscript field name
+13 ; --------- ----------
+14 ; "HL7ID" Name
+15 ; "INTID" Integration ID
+16 ;
+17 NEW SUB,NODE
+18 ;
+19 IF '$GET(SCIEN)
QUIT 0
+20 IF '$DATA(^SCPT(404.49,SCIEN,0))
QUIT 0
+21 KILL SCHLID
SET SCHLID=""
+22 SET NODE=$GET(^SCPT(404.49,SCIEN,0))
+23 SET SCHLID("HL7ID")=$PIECE(NODE,"^")
+24 SET SCHLID("INTID")=$PIECE(NODE,"^",2)
+25 QUIT 1