source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCMCHLA2.m@ 1703

Last change on this file since 1703 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1SCMCHLA2 ;ALB/KCL - PCMM HL7 Error Code & ID File API'S ;25-JAN-2000
2 ;;5.3;Scheduling;**210**;AUG 13, 1993
3 ;
4GETEC(SCIEN,SCEC) ;
5 ; Description: Used to obtain a record from the PCMM HL7 ERROR CODE
6 ; (#404.472) file and place it into the local SCECODE array.
7 ;
8 ; Input :
9 ; SCIEN - IEN of a PCMM HL7 ERROR CODE record
10 ;
11 ; Output:
12 ; Function Value - returns 1 on success, 0 on failure.
13 ; SCECODE - if succes, the name of local array containing the record,
14 ; passed by reference.
15 ;
16 ; subscript field name
17 ; --------- ----------
18 ; "CODE" Error Code
19 ; "SEG" Segment
20 ; "FLD" Field
21 ; "SHORT" Short Description
22 ;
23 N NODE
24 ;
25 I '$G(SCIEN) Q 0
26 I '$D(^SCPT(404.472,SCIEN,0)) Q 0
27 ;
28 K SCECODE S SCECODE=""
29 S NODE=$G(^SCPT(404.472,SCIEN,0))
30 S SCEC("CODE")=$P(NODE,"^")
31 S SCEC("SEG")=$P(NODE,"^",2)
32 S SCEC("FLD")=$P(NODE,"^",3)
33 S SCEC("SHORT")=$P(NODE,"^",4)
34 Q 1
35 ;
36 ;
37GETHL7ID(SCIEN,SCHLID) ;
38 ; Description: Used to obtain a record from the PCMM HL7 ID
39 ; file and place it into the local SCHLID array.
40 ;
41 ; Input :
42 ; SCIEN - IEN of a PCMM HL7 ID record
43 ;
44 ; Output:
45 ; Function Value - returns 1 on success, 0 on failure.
46 ; SCHID - if succes, the name of local array containing the record,
47 ; passed by reference.
48 ;
49 ; subscript field name
50 ; --------- ----------
51 ; "HL7ID" Name
52 ; "INTID" Integration ID
53 ;
54 N SUB,NODE
55 ;
56 I '$G(SCIEN) Q 0
57 I '$D(^SCPT(404.49,SCIEN,0)) Q 0
58 K SCHLID S SCHLID=""
59 S NODE=$G(^SCPT(404.49,SCIEN,0))
60 S SCHLID("HL7ID")=$P(NODE,"^")
61 S SCHLID("INTID")=$P(NODE,"^",2)
62 Q 1
Note: See TracBrowser for help on using the repository browser.