source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLTP3A.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1HLTP3A ;SFIRMFO/RSD - Transaction Processor for TCP- INIT ;11/19/2003 13:57
2 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13, 1995
3 ;
4 ;split from hltp3
5 Q
6INIT ;initialize variables, get MSA & header, returns HLRESLT if error
7 N HLJ
8 ;
9 K HLRESLT,HL
10 S HLMTIENS=+X,HLMTIEN=+$P(X,U,2),HLMSA=$$MSA^HLTP3(HLMTIEN)
11 ;
12 ;get header and validate
13 M HLHDRO=^HLMA(HLMTIENS,"MSH")
14 ;HLMSA is by ref., for a batch msg HLMSA will be setup in HLTPCK2
15 D CHK^HLTPCK2(.HLHDRO,.HL,.HLMSA)
16 ;Update Message Administration file #773, for incoming message
17 ;3=trans type, 20=status
18 K HLJ
19 S X="HLJ(773,"""_HLMTIENS_","")",@X@(3)="I",@X@(20)=9
20 ;HL=error #^error text, 21=date process, 22=error msg, 23=error type
21 S:$G(HL) @X@(20)=4,@X@(21)=$$NOW^XLFDT,@X@(22)=$P(HL,U,2),@X@(23)=+HL
22 ;8=protocol, 13=sending app
23 S:$G(HL("EIDS")) @X@(8)=HL("EIDS") S:$G(HL("SAP")) @X@(13)=HL("SAP")
24 ;14=receiving app, 12=acknowledgement to
25 S:$G(HL("RAP")) @X@(14)=HL("RAP") S:$G(HL("MTIENS")) @X@(12)=HL("MTIENS")
26 ;6=initial message, 7=logical link
27 S:$G(HLTCPI) @X@(6)=HLTCPI S @X@(7)=HLDP
28 ;
29 ;15=message type, 16=event type
30 S:$G(HL("MTP")) @X@(15)=HL("MTP") S:$G(HL("ETP")) @X@(16)=HL("ETP")
31 ;HL*1.6*109 S:$G(HL("MTP_ETP")) @X@(17)=HL("MTP_ETP")
32 D FILE^HLDIE("","HLJ","","INIT-1","HLTP3A") ;HL*1.6*109
33 ;Update Message Text file #772
34 ;4=trans type
35 K HLJ S X="HLJ(772,"""_HLMTIEN_","")",@X@(4)="I"
36 ;10=event protocol
37 S:$G(HL("EID")) @X@(10)=HL("EID")
38 D FILE^HLDIE("","HLJ","","INIT-2","HLTP3A") ; HL*1.6*109
39 ;set HLRESLT to error
40 S:HL'="" HLRESLT=HL
41 Q
Note: See TracBrowser for help on using the repository browser.