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

GMTSRS3.m

Go to the documentation of this file.
  1. GMTSRS3 ; SLC/KER - Health Summary Resequence - Misc ; 02/11/2003
  1. ;;2.7;Health Summary;**62**;Oct 20, 1995
  1. ;
  1. Q
  1. SI ; Structure for Items
  1. W !!," Example Health Summary Type with Components containing Selection"
  1. W !," Items which may be resequenced",!
  1. W !," Health Summary Type Rehab Summary"
  1. W !," Health Summary Component Brief Demographics"
  1. W !," Health Summary Component Lab Cum Selected"
  1. W !," 1 Selection Item Glucose"
  1. W !," 2 Selection Item B 12"
  1. W !," 3 Selection Item Liver Function"
  1. W !," Health Summary Component Health Factor Select"
  1. W !," 1 Selection Item Alcohol Screen"
  1. W !," 2 Selection Item Depression Screening"
  1. W !," Health Summary Component Progress Notes"
  1. Q
  1. SC ; Structure for Components
  1. I '$D(GMTST) D Q
  1. . W !,?3,"Example of a Health Summary Type with multiple components which ",!,?3,"may be resequenced.",!
  1. . W !,?5,"Health Summary Type",?32,"REHAB SUMMARY"
  1. . W !,?7,"Component #1",?34,"BRIEF DEMOGRAPHICS"
  1. . W !,?7,"Component #2",?34,"LAB CUM SELECTED"
  1. . W !,?7,"Component #3",?34,"HEALTH FACTOR SELECT"
  1. . W !,?7,"Component #4",?34,"PROGRESS NOTES"
  1. N GMTSI,GMTSC,GMTSN
  1. W !,?3,"This Health Summary Type has multiple Components which may be resequenced.",!
  1. W !,?5,"Health Summary Type",?32,$$UP^XLFSTR($P($G(^GMT(142,+GMTST,0)),"^",1))
  1. S (GMTSC,GMTSI)=0 F S GMTSI=$O(^GMT(142,+($G(GMTST)),1,GMTSI)) Q:+GMTSI=0 D
  1. . S GMTSN=$P($G(^GMT(142,+($G(GMTST)),1,+GMTSI,0)),"^",2)
  1. . S GMTSN=$P($G(^GMT(142.1,+GMTSN,0)),"^",1) Q:'$L(GMTSN)
  1. . S GMTSC=GMTSC+1
  1. . W !,?7,"Component #",GMTSC,?34,$$UP^XLFSTR(GMTSN)
  1. Q
  1. YN ; Yes/No
  1. W !,?3,"Enter either 'Y' or 'N'."
  1. Q
  1. TRIM(X) ; Remove Spaces
  1. S X=$G(X) F Q:$E(X,1)'=" " S X=$E(X,2,$L(X))
  1. F Q:$E(X,$L(X))'=" " S X=$E(X,1,($L(X)-1))
  1. Q X