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

TIU370P.m

Go to the documentation of this file.
  1. TIU370P ; NA/AJB - PERSIAN GULF UPDATE;Nov 06, 2024@12:59:03
  1. ;;1.0;TEXT INTEGRATION UTILITIES;**370**;Jun 20, 1997;Build 14
  1. ;
  1. ; Reference to FIND1^DIC in ICR #2051
  1. ; Reference to BMES^XPDUTL in ICR #10141
  1. ; Reference to MES^XPDUTL in ICR #10141
  1. ;
  1. Q
  1. DEL ; testing use only
  1. N DETAILS,ENTRY
  1. F ENTRY=1:1 S DETAILS=$P($T(ENTRIES+ENTRY),";",2,4) Q:DETAILS="" D
  1. . N DA,DIK,NAME,PARENT,TYPE,X,Y
  1. . S NAME=$P(DETAILS,";"),DA=$$LU(8925.1,NAME,"X"),DIK="^TIU(8925.1,",PARENT=$$LU(8925.1,"PROGRESS NOTES","X"),TYPE=$P(DETAILS,";",3) Q:'DA
  1. . D ^DIK Q:TYPE'="DC"
  1. . K ^TIU(8925.1,PARENT,10,"C",NAME)
  1. . K ^TIU(8925.1,PARENT,10,$O(^TIU(8925.1,PARENT,10,"B",DA,0)))
  1. . K ^TIU(8925.1,PARENT,10,"B",DA)
  1. Q
  1. ENTRIES ;name;print name;type;m-code
  1. ;VA-PERSIAN GULF STATUS;VA-Persian Gulf Status;OBJ
  1. ;VA-GULFVET QUESTIONNAIRE;;DC
  1. ;GULFVET QUESTIONNAIRE;GulfVET Questionnaire;DOC
  1. ;
  1. LU(FILE,NAME,FLAGS,SCREEN,INDEXES) ;
  1. Q $$FIND1^DIC(FILE,"",$G(FLAGS),NAME,$G(INDEXES),$G(SCREEN))
  1. POST ; post-install
  1. N DETAILS,ENTRY
  1. F ENTRY=1:1 S DETAILS=$P($T(ENTRIES+ENTRY),";",2,4) Q:DETAILS="" D
  1. . N DA,NAME,PNAME,TYPE,X,Y
  1. . S NAME=$P(DETAILS,";"),PNAME=$P(DETAILS,";",2),TYPE=$P(DETAILS,";",3)
  1. . I TYPE="OBJ" S DA=$$CROBJ^TIUCROBJ(NAME,"",PNAME,"S X=$$PGULF^TIUMSER(DFN)")
  1. . I TYPE="DC" S DA=$$CRDD^TIUCRDD(NAME,TYPE,11,"PROGRESS NOTES")
  1. . I TYPE="DOC" D S DA=$$CRDD^TIUCRDD(NAME,TYPE,11,"VA-GULFVET QUESTIONNAIRE","PRIMARY CARE NOTE")
  1. . . ; remove previously linked entries
  1. . . D UNLINK
  1. . Q:PNAME=""
  1. . N TIU,ERROR
  1. . S TIU(8925.1,$$LU(8925.1,NAME,"X")_",",.03)=PNAME
  1. . D UPDATE^DIE("","TIU","","ERROR")
  1. Q
  1. N NAME S NAME="GULFVET QUESTIONNAIRE"
  1. N DIALOG S DIALOG=$$LU(801.41,"VA-GULFVET QUESTIONNAIRE","X","I $P(^(0),U,4)=""R""") Q:'DIALOG
  1. N OUT D FIND^DIC(8927,"","@;.01I","P",NAME,"","","","","OUT")
  1. N PARENT S PARENT=$$LU(8927,"Document Titles","X") Q:'PARENT
  1. N NUM S NUM=0 F S NUM=$O(OUT("DILIST",NUM)) Q:'NUM D
  1. . N IEN S IEN=+OUT("DILIST",NUM,0)
  1. . N NODE S NODE=$G(^TIU(8927,IEN,0))
  1. . Q:$P(NODE,U,6)>0 ; personal owner
  1. . Q:$P(NODE,U,15)'=DIALOG ; reminder dialog
  1. . N NUM S NUM=0 F S NUM=$O(^TIU(8927,PARENT,10,NUM)) Q:'NUM D
  1. . . Q:$P($G(^TIU(8927,PARENT,10,NUM,0)),U,2)'=IEN
  1. . . N DA,DIK S DA(1)=PARENT,DA=NUM,DIK="^TIU(8927,"_DA(1)_",10," D ^DIK ; remove entries from parent first
  1. . N DA,DIK S DA=IEN,DIK="^TIU(8927," D ^DIK ; remove entry
  1. Q