Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MDHL7K2

MDHL7K2.m

Go to the documentation of this file.
MDHL7K2 ; HOIFO/WAA -HP EnConcert Echo ; 06/08/00
 ;;1.0;CLINICAL PROCEDURES;;Apr 01, 2004
 N TCNT,ICNT,LN
 S (TCNT,ICNT,LN)=0
OBX ; Process OBX
 N MDATT,PROC
 D ATT^MDHL7U(DEVIEN,.MDATT) Q:MDATT<1
 S PROC=0
 F  S PROC=$O(MDATT(PROC)) Q:PROC<1  D
 . N PROCESS
 . S PROCESS=$P(MDATT(PROC),";",5)
 . I PROCESS="TEXT^MDHL7U2" D TXT
 . D @PROCESS
 . Q
 Q:'MDIEN
 D REX^MDHL7U1(MDIEN)
 D GENACK^MDHL7X
 Q
TXT ; Rebuild the text message for CLINICAL PROCEDURES
 N MDHLD,CNT,CNT2,LINE,P,TIM1,TIM2,TIME,MDDT,MDHT,MSGC,TITLE,TITLE1
 S P="|"
 S (CNT,CNT2,TITLE,TITLE1)=0
 F  S CNT=$O(^TMP($J,"MDHL7A",CNT)) Q:CNT<1  D
 .S LINE=^TMP($J,"MDHL7A",CNT)
 .I $P(LINE,P,1)'="OBX" Q
 .I $P(LINE,P,3)'="TX" Q
 .I $E($P(LINE,P,6),1,2)="//" Q
 .I $E($P(LINE,P,6),1,2)="\\" Q
 .S TITLE=$P(LINE,P,4),TITLE=$P(TITLE,U,2)
 .I TITLE="PreliminaryReader" D
 .. N MN,ML,MF,MI,MS,MT
 .. S MN=$P(LINE,P,6),ML=$P(MN,U,2)
 .. S MF=$P(MN,U,3),MI=$P(MN,U,4)
 .. S MS=$P(MN,U,5),MT=$P(MN,U,6)
 .. S MN=MF
 .. I MI'="" S MN=MN_" "_MI_"."
 .. S MN=MN_" "_ML
 .. I MS'="" S MN=MN_", "_MS_"."
 .. I MT'="" S MN=MN_", "_MT
 .. S $P(LINE,P,6)=MN
 ..Q
 .I TITLE'=TITLE1 D
 .. N LBL
 .. S CNT2=CNT2+1,^TMP($J,"MDHL7","TEXT",CNT2)="OBX||TX||| "
 .. S CNT2=CNT2+1
 .. S LBL=$P(TITLE,"&",2)
 .. I LBL="" S LBL=$P(TITLE,"&")
 .. S ^TMP($J,"MDHL7","TEXT",CNT2)="OBX||TX|||"_LBL,TITLE1=TITLE
 .. Q
 .S CNT2=CNT2+1,^TMP($J,"MDHL7","TEXT",CNT2)=LINE
 .Q
 Q