ECXPCT ;BIR/CML-Print List of Primary Care Teams ;4/4/19 15:29
;;3.0;DSS EXTRACTS;**149,174**;Dec 22, 1997;Build 33
EN ;entry point from option
N ECXPORT ;149
W !!,"This option prints a list of all Primary Care Teams. The list is sorted",!,"alphabetically by TEAM name and displays the pointer to the TEAM file (#404.51)."
I '$O(^SCTM(404.51,0)) W !!,"The TEAM file (#404.51) does not exist on your system!" G QUIT
S ECXPORT=$$EXPORT^ECXUTL1 Q:ECXPORT=-1 I $G(ECXPORT) D EXPORT Q ;149
W !!,"The right margin for this report is 80.",!!
W ! K DIC S DIC="^SCTM(404.51,",FLDS=".01;""TEAM NAME"",NUMBER;""TEAM FILE POINTER"";C45;R9",BY=".01",(FR,TO)="",DHD="Primary Care Teams",L=0
D EN1^DIP
QUIT Q
;
EXPORT ;149 Export team information to spreedsheet - entire section added
N DIC,FLDS,BY,FR,TO,L,DIOBEG,DHD,POP,X,%ZIS,IOP
W !!,"To ensure all data is captured during the export:"
;174 Logging instructions changed.
W !!,"1. In reflections, change the row margin by clicking on one of the change margin",!," icons with a value of 225 or higher if you have them."
W !," You may also set the margin manually by clicking on appearance, expanded",!," terminal settings (arrow in lower right corner), set up display settings."
W !," Scroll to the bottom and change the number of characters per row to 225"
W !," or higher. Click 'OK' to save your change."
W !,"2. Click on 'capture setup' or 'tools, logging (arrow in lower right corner)'",!," depending on your setup. Ensure the logging settings form only has 'to disk'",!," selected and enter"
W " the path and filename where the output should be stored."
W !,"3. Click 'start capture' or 'start logging', depending on your interface."
W !,"4. The DEVICE input for the columns should also contain a large enough",!," parameter (e.g. 225). The DEVICE prompt is defaulted to 0;225;99999 for you.",!," You may change it if need be."
W !,"Example: DEVICE: 0;225;99999 *Where 0 is your screen, 225 is the margin width",!?17,"and 99999 is the screen length."
W !!,"NOTE: In order for all number fields, such as SSN and Feeder Key, to be",!,"displayed correctly in the spreadsheet, these fields must be formatted as Text",!,"when importing the data into the spreadsheet.",!
S DIC="^SCTM(404.51,",FLDS="NAME_""^""_NUMBER",BY="@.01",(FR,TO)="",DHD="@@",L=0,DIOBEG="W ""TEAM NAME^TEAM FILE POINTER"""
S %ZIS="N",%ZIS("B")="0;225;99999" D ^%ZIS Q:POP S IOP=ION_";"_IOM_";"_IOSL
D EN1^DIP
I '$G(POP) D ;Don't print the following lines if the report didn't print
.W !!,"Click 'stop capture' or 'tools, stop logging' to end logging..." ;174
.W !,"...Then, pull your export text file into your spreadsheet.",!
.S DIR(0)="E",DIR("A")="Press any key to continue" D ^DIR
I IO'=IO(0) D ^%ZISC
D HOME^%ZIS
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECXPCT 2825 printed Nov 22, 2024@17:03:31 Page 2
ECXPCT ;BIR/CML-Print List of Primary Care Teams ;4/4/19 15:29
+1 ;;3.0;DSS EXTRACTS;**149,174**;Dec 22, 1997;Build 33
EN ;entry point from option
+1 ;149
NEW ECXPORT
+2 WRITE !!,"This option prints a list of all Primary Care Teams. The list is sorted",!,"alphabetically by TEAM name and displays the pointer to the TEAM file (#404.51)."
+3 IF '$ORDER(^SCTM(404.51,0))
WRITE !!,"The TEAM file (#404.51) does not exist on your system!"
GOTO QUIT
+4 ;149
SET ECXPORT=$$EXPORT^ECXUTL1
if ECXPORT=-1
QUIT
IF $GET(ECXPORT)
DO EXPORT
QUIT
+5 WRITE !!,"The right margin for this report is 80.",!!
+6 WRITE !
KILL DIC
SET DIC="^SCTM(404.51,"
SET FLDS=".01;""TEAM NAME"",NUMBER;""TEAM FILE POINTER"";C45;R9"
SET BY=".01"
SET (FR,TO)=""
SET DHD="Primary Care Teams"
SET L=0
+7 DO EN1^DIP
QUIT QUIT
+1 ;
EXPORT ;149 Export team information to spreedsheet - entire section added
+1 NEW DIC,FLDS,BY,FR,TO,L,DIOBEG,DHD,POP,X,%ZIS,IOP
+2 WRITE !!,"To ensure all data is captured during the export:"
+3 ;174 Logging instructions changed.
+4 WRITE !!,"1. In reflections, change the row margin by clicking on one of the change margin",!," icons with a value of 225 or higher if you have them."
+5 WRITE !," You may also set the margin manually by clicking on appearance, expanded",!," terminal settings (arrow in lower right corner), set up display settings."
+6 WRITE !," Scroll to the bottom and change the number of characters per row to 225"
+7 WRITE !," or higher. Click 'OK' to save your change."
+8 WRITE !,"2. Click on 'capture setup' or 'tools, logging (arrow in lower right corner)'",!," depending on your setup. Ensure the logging settings form only has 'to disk'",!," selected and enter"
+9 WRITE " the path and filename where the output should be stored."
+10 WRITE !,"3. Click 'start capture' or 'start logging', depending on your interface."
+11 WRITE !,"4. The DEVICE input for the columns should also contain a large enough",!," parameter (e.g. 225). The DEVICE prompt is defaulted to 0;225;99999 for you.",!," You may change it if need be."
+12 WRITE !,"Example: DEVICE: 0;225;99999 *Where 0 is your screen, 225 is the margin width",!?17,"and 99999 is the screen length."
+13 WRITE !!,"NOTE: In order for all number fields, such as SSN and Feeder Key, to be",!,"displayed correctly in the spreadsheet, these fields must be formatted as Text",!,"when importing the data into the spreadsheet.",!
+14 SET DIC="^SCTM(404.51,"
SET FLDS="NAME_""^""_NUMBER"
SET BY="@.01"
SET (FR,TO)=""
SET DHD="@@"
SET L=0
SET DIOBEG="W ""TEAM NAME^TEAM FILE POINTER"""
+15 SET %ZIS="N"
SET %ZIS("B")="0;225;99999"
DO ^%ZIS
if POP
QUIT
SET IOP=ION_";"_IOM_";"_IOSL
+16 DO EN1^DIP
+17 ;Don't print the following lines if the report didn't print
IF '$GET(POP)
Begin DoDot:1
+18 ;174
WRITE !!,"Click 'stop capture' or 'tools, stop logging' to end logging..."
+19 WRITE !,"...Then, pull your export text file into your spreadsheet.",!
+20 SET DIR(0)="E"
SET DIR("A")="Press any key to continue"
DO ^DIR
End DoDot:1
+21 IF IO'=IO(0)
DO ^%ZISC
+22 DO HOME^%ZIS
+23 QUIT