Home

Report Generator Manual - AVSS - University of California, Santa

image

Contents

1. The EXECUTE command is general purpose allowing for the execution of any MUMPS command Primarily it is used for the computation of user defined local variables from the AVSS database The MUMPS SET command is often used for this purpose Please refer to the Appendix for a complete syntactical description of the SET command The EXECUTE command is also used to display information about a particular record in a Listing Report as shown in the above example with a WRITE command e SELECT Execution Phase The SELECT command determines whether the current observation is to be included for subsequent listing and or tabulation The format of the SELECT command is INCLUDE CONDITION OR EXCLUDE CONDITION where CONDITION is any conditional statement using MUMPS IF syntax In the example report line 202 selects the current record only if birth weight is less than the user specified maximum Please refer to the Appendix for a complete syntactical description of the IF command Page 7 4 7 4 EXAMPLE THREE SUMMARY TABLE REPORT Initialization 101 FORM gt LCA 102 QUERY gt DINDEX FSSU AT SJ 103 SEARCH gt DT Execution 201 EXECUTE gt BWGRP S 26 71 E UNK 26 0 LOBW 26 4500 HIBW 1 7 NORMAL 202 EXECUTE gt S SEX S 21 I E UNK 1 2 203 XTAB gt TABI BWGRP BY SEX Output 301 PAGE gt W E DASH 1 75 302 PAGE gt W 1 CROSS TABULATION OF BIRTHWEIGHT BY SEX 303 P
2. 302 OUTPUT gt W TOTAL NUMBER OF SELECTED RECORDS BWSUM Page 7 3 Note that the SEARCH parameter is now DATE in place of PERSON Instead of selecting a single record using the person selector this report will ask the user to specify a date range by which to search the database Line 104 asks the user to enter a maximum birth weight AVSS System Variables are introduced in Line 106 This line prints a header for the report and shows an example of the use of an AVSS System Variable DATE These are local variables that you can use in your report that are already set up by the Report Generator You can list these variables using V at the EDIT COMMAND prompt A complete listing of the AVSS System Variables can be found in the Appendix A discussion of the new report commands introduced in this report follows e INIT Initialization Phase The INIT command allows execution of MUMPS code to your output before the execution phase There are a variety of MUMPS commands you may use which will be introduced gradually as needed With INIT code you can display header information before the output of a listing report Since the data is displayed during the execution phase printing a header during the output phase will happen AFTER your report is done INIT code is also used to initialize any summary variables or control variables i e BW BWSUM and SUM you wish to use during the execution phase e EXECUTE Execution Phase
3. ENTER EDITOR COMMAND gt DELETE 102 103 ENTER OK TO DELETE lt N gt Y ENTER EDITOR COMMAND gt D 102 103 ENTER OK TO DELETE lt N gt Y ENTER 6 7 COPY Sometimes you can save entry time by copying lines of your report This can be helpful when you need to change the order that certain items are computed or displayed It is also handy when you have several similar statements to enter AVSS will automatically handle numbering the lines for you However if you move report commands from one phase to another it is up to you to make sure the appropriate commands are used If you forget to do this AVSS will display an error message just before you save the report Some examples of the COPY command are EDITOR COMMAND gt C ENTER FROM gt 102 ENTER TO 103 ENTER COPY TO gt 103 ENTER EDITOR COMMAND C ENTER OPY FROM 102 103 ENTER COPY TO gt 103 ENTER EDITOR COMMAND gt COPY 102 103 ENTER COPY TO 103 ENTER EDITOR COMMAND C 102 103 ENTER COPY TO gt 103 ENTER 6 8 SUBSTITUTE The SUBSTITUTE command is used to change one character string into another within a specified range of line numbers This command is useful when making global changes to a report such as replacing one form variable with another Also when copying lines from one phase to another the report command type will have to be changed SUBSTITUTE allows you to do this with one command instead o
4. L When specifying multiple forms the most important thing to remember is that all the forms should have the same variable names 102 FORM gt LCA HCA The 2 forms LCA and HCA 102 FORM PBI B4 forms from BI to B4 i e B1 B2 B3 B4 e SEARCH initialization Phase This command selects the manner in which the database is searched Only one option may be selected from the following ALL Pass through all data for the given XINDs and FORMs INDEX Prompt the user for a range of filing numbers PERSON Prompt the user to select a person from the given XIND and FORM Page 7 2 MASTER Master indexing is the method AVSS uses to link several types of forms together Pass through all data whose forms are included in master indexing DT Prompt the user for beginning and ending dates inclusive NM Prompt the user for lower and upper values of the patient s last name cref Prompt the user for lower and upper ranges of the specified cross reference index cref is usually a 2 or 3 letter mnemonic code Note in the example above that only one person is being selected In this case record selection is performed using the person selector Having done this the database scan is complete and there is no meaning to any specified execution commands e OUTPUT Output Phase The OUPUT command is used for customized printing or computation once the report has finished selecting and processing the desired records in the database In the examp
5. STRING var to where pe Print Control new page new line nn tab to column nn INPUT STRING literal free text var the local variable whose value you want to set to time out value seconds for the read operation EXAMPLES ENTER INPUT gt ARE YOU SURE YN 60 Page A 4 MUMPS COMMAND IF SYNTAX IF Condition IF Condition Condition2 ConditionN with the following form for ConditionN 1 ExpressionA 2 ExpressionA Compare ExpressionB ExpressionA and ExpressionB may be of the following form 1 A numeric or string literal i e 2500 XY Z etc 2 A single variable local or database evaluating to TRUE if the value is non zero Note non numeric strings evaluate to zero 3 A valid MUMPS function value X arguments where x is the desired MUMPS function 4 The negation of the given expression made by prepending an apostrophe expression 5 Two or more expressions combined using valid MUMPS operators evaluating to TRUE if the value is non zero Note that these expression forms are the same as those in the MUMPS SET command Compare is one of the following MUMPS comparison operators lt Less than gt Greater than lt Not less than Greater than or equal to gt Not greater than Less than or equal to Equal to Not equal to Contains does ExpressionA contain ExpressionB Does not contain Follows does Ex
6. are ready to be run on your data and are prefixed by a punctuation character such as See the Appendix for a list of standard reports You need only specify the range of records that you wish to analyze Several examples will be given demonstrating the available features of report generation In the first example you will output the report to the screen and save it to an AVSS file as well REPORT GENERATOR OPTION gt G ENTER ENERATE REPORT REP REPORT gt CAGE2X ENTER DEMOGRAPHIC XTABS BY MOTHER S AGE Use AL to display a list of available reports or f for a list of standard reports REPORT FROM DATE lt 1 1 2002 gt ENTER 1 1 2002 TO DATE lt T gt 3 31 ENTER 3 31 2002 RUN THIS REPORT IN THE BACKGROUND lt N gt ENTER SAVE THE OUTPUT FOR THIS REPORT lt N gt Y ENTER SOC SAVE OUTPUT CODE gt CAGE2X ENTER This is an arbitrary name up to 8 characters used to store retrieve a report ENTER A DESCRIPTION FOR THIS REPORT gt CAGE2X REPORT I7 3 MO 2002 ENTER This is a textual description of the contents of the report that will be saved OUTPUT DEVICE T ENTER PREPARING REPORT The report is now running please refer to Chapter 3 for instructions on retrieving the results Note when you run the report in the foreground it will preclude the use of your terminal for other activities until the report is completed In the next example a form letter will be created The AVSS person s
7. 10 45 AM TEST SAMPLE REPORT OUTPUT OUT OUTPUT REPORT CODE gt H ENTER NB1L2 NEWBORN LISTING 2 2002 2 6 2002 10 45 AM HNB1L2 NEWBORN LISTING 2 2002 2 6 2002 10 45 HNBIL2 ENTER OUTPUT DEVICE T L ENTER T TERMINAL P PRINTER SLAVED TO TERMINAL F PC DOS FILE 1 CONSOLE 4 MODEM OUTPUT DEVICE lt T gt P ENTER NEWBORN LISTING BY HOSPITAL DATE RANGE 2 1 2002 TO 2 2 2002 BABY S BABY S BIRTH BRTH BRTH DLVY MOTHER S DOCTOR S DATE TIME SEX WT TYPE NAME NAME 4321 JFONDA 02 01 2000 3724 VAG JSMITHSON M BAILEY 1234 THAYDEN 02 02 1976 M 3333 VAG RCHAPLIN DSPOCK For certain user classification the report output is saved by the id code corresponding to the user who ran the job Your own id code is the default value Note that the list of possible output devices will reflect your particular system configuration Page 3 1 3 2 DELETE SAVED REPORT Because saved reports consume valuable disk space they should be deleted after they have been printed We recommend that you periodically purge old saved reports from your system using the following procedure SYSTEM OPTION gt R ENTER EPORT GENERATOR REPORT GENERATOR OPTION gt O ENTER UTPUT SAVED REPORT The following prompt will only occur for certain user classifications ID ID CODE lt 1 gt ENTER CHEN PETER M OUT OUTPUT REPORT CODE gt T ENTER TEST SAMPLE REPORT OUTPUT TEST SAMPLE RE
8. AGE gt W E DASH 1 75 304 PAGE gt TABI SPCL TP VILABEL BW GROUP V2LABEL SEX e QUERY Initialization Phase QUERY is an advanced report command that allows you to execute MUMPS code before the report is prepared Use the QUERY command to set the values of XIND and FORM in a customized manner In the example INDEX FSSU sets XIND by prompting the user for a site e XTAB Execution Phase The XTAB cross tabulate command allows you to generate 1 2 or 3 way tables from the database As the report generator scans the data the XTAB command computes the values of the cross tabulated variables and stores them in the NAMEd table These tables may then be output using the TABLE command at output time The syntax formats for XTAB are XTAB gt NAME VARIABLEI XTAB gt NAME VARIABLEI BY VARIABLE2 XTAB gt NAME VARIABLEI BY VARIABLE2 BY VARIABLE3 VARIABLEn may be a computed local variable or a database variable of the form VARIABLE or FORM VARIABLE You may use several XTAB commands so long as the NAME you assign to them are different In one way crosstabs VARIABLEI values comprise the rows In two way crosstabs 1 values comprise the rows and VARIABLE values comprise the columns In three way crosstabs each VARIABLEI value has a cross tab of VARIABLE2 for the rows and VARIABLE3 for the columns e PAGE Execution Output Phase The PAGE command is a line of MUMPS code which is executed when the r
9. ATION 101 XIND gt 0 102 FORM gt LCA 103 SEARCH gt PERSON EXECUTION OUTPUT 301 EXECUTE gt W FIRST NAME 1A 302 EXECUTE gt W MIDDLE NAME 1B 303 EXECUTE gt W LAST NAME 1C 304 EXECUTE gt W BIRTH WEIGHT 26 This simple report extracts name and birth weight data for a selected patient and prints the information in a line by line fashion We will now examine each of the commands in the example report to see how they work e XIND initialization Phase XIND is the system variable containing the site code you wish to examine when searching the AVSS database See the Appendix for a definition of all the AVSS system variables In our example program XIND is 0 which corresponds to the test site For multiple site specifications you may use a comma delimited list of codes or to specify a range of XIND or use the MUMPS FOR command structure to examine an incremental range of codes More than one XIND command may be used within a single report Some examples of the XIND command follow 101 XIND gt 2005 2075 All sites from 2005 to 2075 inclusive 101 XIND gt 205 217 219 The 3 sites 205 217 and 219 101 XIND gt 317 1 322 405 From code 317 inclusive increment by 1 up to 322 inclusive and 405 Please note that the upper and lower ranges of the specification are inclusive To see a list of site codes that contains data in your AVSS database use
10. AVSS UNIVERSITY OF CALIFORNIA AUTOMATED VITAL STATISTICS SYSTEM REPORT GENERATOR MANUAL COPYRIGHT NOTICE Copyright 1990 by The Regents of the University of California All rights reserved This document may not be copied without prior consent from a designee of the Regents of the University of California However in consideration of the local State and federal funding sources that assisted in the development of this product it is the intent of the Regents to make this information readily available and re Quests for permission to copy are likely to be granted Please address all requests to AVSS Project Community and Organization Research Institute University of California Santa Barbara CA 93106 805 961 3143 TRADEMARKS Automated Vital Statistics System and AVSS are trademarks of the Regents of the University of California 1 2 2 1 2 2 CHAPTER 3 3 1 3 2 CHAPTER 4 CHAPTER 5 CHAPTER 6 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 6 10 CHAPTER 7 7 1 Ju 7 3 7 4 APPENDIX TABLE OF CONTENTS INTRODUCTION 1 1 2 1 Foreground RUNS 2 1 Background RUfIS 2 2 OUTPUT SAVED REPORT 3 Output Saved ulus vet EXE EY ae 3 Delete Saved 3 2 QUERY 4 1 CONCEP TS 5 1 REPORT EDITOR
11. CIFIC VALUE S gt 0 19 ENTER LEVEL 2 FIELD NUMBER TO BE REPORTED ON 26 ENTER BIRTHWEIGHT LEVEL 2 PLEASE ENTER SPECIFIC VALUE S gt ENTER Selection conditions under SPECIFIC VALUE S may be in the following order VALI Specific value LOWVAL HIGHVAL Range of values note the two dashed VALI Values containing VAL keyword search NULL Null values UNDEF Undefined values Combination of any of above conditions NOT C1 C2 For all values except these In this example item MAGE or AGE OF MOTHER is a selection variable with a LOWVAL of 0 and a HIGHVAL of 19 The reporting variable is item 26 or BIRTHWEIGHT Note that items with range conditions should be numeric Page 4 1 Next AVSS prompts for various options pertaining to this report The default responses are most commonly used INDEX TO SEARCH lt DATE OF BIRTH gt ENTER BEGINNING DATE lt 1 1 2002 gt ENTER 1 1 2002 ENDING DATE lt T gt ENTER 11 4 2002 DO YOU WANT FILE VARIABLES ON ALL RECORDS FOUND DURING QUERY lt N gt ENTER By answering Y to this prompt AVSS will display identifying information for each record matching the selection criteria SAVE THESE COMMANDS FOR THE REPORT GENERATOR lt N gt ENTER RUN THIS REPORT IN THE BACKGROUND lt N gt ENTER SAVE THE OUTPUT FROM THIS REPORT lt N gt ENTER OUTPUT DEVICE lt T gt ENTER SEARCHING DATABASE XXXXXXXX Each X represents 10 certificat
12. GHT LISTING BY OCCURRENCE CMDBW1X MD LICENSE BY BIRTH WEIGHT BY OCCURRENCE CMDBW2X MD NAME BY BIRTH WEIGHT BY OCCURRENCE CMDCS1X MD LICENSE BY PRI RPT CSECTION RATES BY OCCURRENCE CMDCS2X MD NAME BY PRI RPT CSECTION RATES BY OCCURRENCE ZCMDMIAX MD LICENSE BY MONTH 1 6 MONTHS BY OCCURRENCE ZCMDMIBX MD LICENSE BY MONTH 2 6 MONTHS BY OCCURRENCE CMDM2AX MD NAME BY MONTH 1 6 MONTHS BY OCCURRENCE CMDM2BX MD NAME BY MONTH 2 6 MONTHS BY OCCURRENCE ZCMTIL MATERNAL TRANSPORT LISTING BY OCCURRENCE ZCMULTIL MULTIPLE BIRTH LISTING BY OCCURRENCE CNBIL NEWBORN LISTING BY OCCURRENCE CNB2L NON CONFIDENTIAL NEWBORN LISTING BY OCCURRENCE CPAY IX SOURCE OF PAYMENT FOR PRENATAL CARE OF OCCURRENCE CPAY2X SOURCE OF PAYMENT FOR DELIVERY XTABS BY OCCURRENCE CPGCT PREGNANCY COMPLICATIONS BY OCCURRENCE CPRE1X PRENATAL CARE CROSS TABULATIONS BY OCCURRENCE CPRE2X KESSNER PRENATAL CARE INDEX XTABS BY OCCURRENCE CPROCT CLINICAL PROCEDURES RELATED TO NEWBORN CPRV1X PRENATAL VISIT CROSS TABULATIONS BY OCCURRENCE CSRIT SUMMARY REPORT BY OCCURRENCE Page A 2 APPENDIX BEGIN BEGINH DASH END ENDH FOOT FORM INDEX PAGESIZE SITE START TIME TODAY USER VILO VIHI XIND AVSS SYSTEM VARIABLES Date and time when the database search began The H value when the database search began String of dashes use the E function for the desired length Date and time when the database search finished The H value wh
13. LETTER As throughout AVSS the question mark command gives you tutorial help Note that the command in the example above lists eight REPORT EDITOR commands You will usually enter one of these commands as follows e Insert the desired line number e Enter the first letter of the report command e Specify the arguments for the report command Page 6 1 After specifying the line number AVSS expects you to enter one of the appropriate REPORT EDITOR commands As shown in the example above the gives a list of these commands You may specify REPORT EDITOR commands as follows e Enter the first letter of the command followed by ENTER or e Enter the first two letters of the command or e Enter the first letter of the command and wait 2 seconds 6 2 INSERT When you begin to develop a new report from scratch you will be using the INSERT command to add lines Here are some of the ways that you can use this command EDITOR COMMAND gt INSERT ENTER AT LINE gt 101 ENTER EDITOR COMMAND gt I ENTER NSERT LINE gt 101 ENTER EDITOR COMMAND gt INSERT 101 ENTER EDITOR COMMAND gt 1 101 ENTER Choosing the latter we begin entering lines as follows EDITOR COMMAND gt I 101 ENTER 101 X ENTER IND gt 0 ENTER 102 ENTER ORM gt BC ENTER 103 ENTER gt P ENTER ERSON 104 ENTER EDITOR COMMAND gt Note that you can continue to INSERT
14. ORMS HB HCA COUNTY OF RESIDENCE DATA FORMS BC LCA L LISTING REPORT T ONE WAY TABULATION REPORT X CROSS TABULATION REPORT FOR EXAMPLE HNBIL LINE LISTING ON FORM HB BY HOSPITAL OF OCCURRENCE CSRIT ONE WAY TABULATION ON FORM BC BY COUNTY OF RESIDENCE ZFAGE2X CROSS TAB ON FORM LCA BY FACILITY S OF OCCURRENCE RPRE2X CROSS TABULATION OF FORM LCA BY COUNTY OF RESIDENCE ZHMTIL LINE LISTING ON FORM HCA BY HOSPITAL OF OCCURRENCE TO SEE SUBSETS OF REPORTS ENTER IN THE FIRST 1 OR 2 CHARACTERS C ALL 1988 OR EARLIER COUNTY OF OCCURRENCE REPORTS H ALL 1989 OR LATER HOSPITAL OF OCCURRENCE REPORTS F ALL 1988 OR EARLIER FACILITY S OF OCCURRENCE REPORTS R ALL 1989 OR LATER COUNTY OF RESIDENCE REPORTS Page A 1 APPENDIX CALIFORNIA STANDARD REPORTS STANDARD REPORTS BY COUNTY OR LRD OF OCCURRENCE The following list is obtained by responding with a C when AVSS prompts for report name CAGE1X TEENAGE CROSS TABULATIONS BY OCCURRENCE CAGE2X MATERNAL AGE CROSS TABULATIONS BY OCCURRENCE CANOMT CONGENITAL ANOMALIES BY OCCURRENCE CBW1X BIRTH WEIGHT CROSS TABULATIONS BY OCCURRENCE ZCDLVY1X METHOD OF DELIVERY CROSS TABULATIONS BY OCCURRENCE CED1X MATERNAL EDUCATION CROSSTABULATIONS BY OCCURRENCE CETH1X ETHNICITY CROSS TABULATIONS BY OCCURRENCE CGABWX GESTATIONAL AGE BY BIRTH WEIGHT BY OCCURRENCE CLDCT LABOR DELIVERY COMPLICATIONS BY OCCURRENCE CLOBW1L LOW BIRTH WEI
15. PORT OUTPUT TEST K ENTER OK TO DELETE Y ENTER Page 3 2 CHAPTER 4 UERY DATABASE You can use this option you want to see values of one particular variable for a selected group of records The following example will show how to find the values of birth weight the variable for teenage mothers the selected group REPORT GENERATOR OPTION gt Q ENTER UERY DATABASE INITIALIZING eese AVSS next prompts for the type of form to be searched e g HCA for hospital birth record LCA for legal birth certificate or use L for the list of choices FORM SELECTION gt LCA ENTER BIRTH CERTIFICATE Next AVSS prompts for the site information You may enter more than one item by separating each site with a comma or specifying a range by separating your limits with a double dash You may also enter your choices one after the other since AVSS will continue to prompt for XIND until you are done XIND SITE CODES XX ENTER XIND SITE CODES ENTER The next items of information are somewhat more complex LEVEL keeps track of how many variables you have used in the selection criteria FIELD NUMBER TO BE REPORTED ON is the variable identifier from the selected form SPECIFIC VALUE S determines whether the variable is to be used in the selection criteria or whether it is the variable to be reported on LEVEL 1 FIELD NUMBER TO BE REPORTED ON MAGE ENTER MOTHER S AGE LEVEL 1 PLEASE ENTER SPE
16. TE lt T gt 3 31 ENTER 3 31 2002 The next set of questions determines how and where the output is to be generated In this example the report will run in the background This allows you to continue working on your terminal while the output of the report is being saved on the computer disk You can display or print the results at a later time RUN THIS REPORT IN THE BACKGROUND lt N gt Y ENTER SOC SAVE OUTPUT CODE gt 1 ENTER ENTER A DESCRIPTION FOR THIS REPORT gt CAGE1X REPORT 1 QTR 2002 ENTER DELAY UNTIL lt NOW gt ENTER Enter the 24 hour clock time HHMM here to delay the startup of your report PREPARING REPORT THIS REPORT BEING RUN IN THE BACKGROUND EXIT Page 2 2 CHAPTER 3 OUTPUT SAVED REPORT 3 1 OUTPUT SAVED REPORT If you run a report in the background or otherwise save the report output an AVSS file will be created containing the results of the report You may then use the OUTPUT SAVED REPORT sub option to display or print the out put to your terminal or printer SYSTEM OPTION gt R ENTER EPORT GENERATOR REPORT GENERATOR OPTION gt O ENTER UTPUT SAVED REPORT The following prompt will only occur for certain user Classifications ID ID CODE lt 1 gt ENTER CHEN PETER M OUT OUTPUT REPORT CODE gt L ENTER ARCHIV01 GENERAL BACKUP LOG 6 16 2002 05 24 PM CAGE1X TEENAGE CROSS TAB REPORT 8 21 2002 09 45 PM HNBL2 NEWBORN LISTING 2 2002 10 6 2002
17. ands for the first line and L stands for the last line After typing L you specify line ranges by giving the beginning line number then a range delimiter or blank followed by the ending line number If the line number you specify does not appear in the report then the next existing line number is used Also you can specify a single line number if the beginning and ending range numbers are the same i e F 206 or L Some more examples of the LIST command are as follows EDITOR COMMAND L ENTER IST FROM lt FIRST gt 101 ENTER TO lt LAST gt 299 ENTER EDITOR COMMAND gt LIST 301 400 ENTER EDITOR COMMAND L ENTER IST FROM lt FIRST gt 201 205 ENTER EDITOR COMMAND gt L F 200 ENTER Here is how one might use the LIST command on the example report EDITOR COMMAND L F L ENTER INITIALIZATION 101 XIND gt 0 102 FORM gt 103 SEARCH gt PERSON EXECUTION OUTPUT 301 EXECUTE gt W FIRST NAME 1A 302 EXECUTE gt W MIDDLE NAME 1B 303 EXECUTE gt W LAST NAME 1C 304 EXECUTE gt W BIRTH WEIGHT 26 6 4 MODIFY There are two ways to invoke the MODIFY command The first is by specifying the MODIFY command and then the line number you wish to edit For example EDITOR COMMAND gt M ENTER ODIFY LINE gt 102 ENTER EDITOR COMMAND gt MODIFY 102 ENTER EDITOR COMMAND gt 102 ENTER The second way i
18. as many lines as you want Just press ENTER when you have completed the information that you wish to insert and you will be returned to the EDITOR COMMAND gt prompt Then if you wish to start inserting in another line number range enter a new line number as follows EDITOR COMMANDS gt I 301 ENTER 301 E ENTER XECUTE gt W L FIRST NAME 1A ENTER 302 E ENTER XECUTE gt W MIDDLE NAME 1B ENTER 303 E ENTER XECUTE gt W LAST NAME 1C ENTER 304 E ENTER XECUTE gt W BIRTH WEIGHT 26 ENTER There are a few restrictions on the line numbers that you specify Recall from Chapter 5 that there are three phases of a report Initialization Execution and Output If there are no entries for any of these phases the first line that you are attempting to INSERT must be 101 201 or 301 AVSS checks to see whether you are attempting to INSERT a line that is out of range For example in the example report above trying to INSERT any line number greater than 104 would result in an error since 103 is the last initialization line and 104 is the next expected line number Page 6 2 6 3 LIST In the LIST command like most other REPORT EDITOR commands you may specify the desired range of lines after the command followed by a space Report Editor commands that require a range specification are LIST DELETE COPY and PRINT You may list all the lines in a report by entering F L where F st
19. at this time and actually experience the interaction with the computer This tutorial assumes that you are already familiar with the basic AVSS interactive method as discussed in the AVSS User s Manual A simple example of an Individual Report will be used to demonstrate the use of the REPORT EDITOR SYSTEM OPTION gt R ENTER EPORT GENERATOR REPORT GENERATOR OPTION gt R ENTER EPORT EDITOR SRC SAVE REPORT CODE gt TEST1 ENTER REPORT NOT FOUND OK TO ADD gt Y ENTER ENTER TITLE OF REPORT gt TUTORIAL EXAMPLE 1 ENTER COPY FROM ANOTHER REPORT lt N gt ENTER EDITOR COMMAND gt ENTER LJIST RANGE LIST A RANGE OF LINES M ODIFY LINE MAKE CHANGES IN A PARTICULAR LINE R EPLACE LINE REPLACE AN ENTIRE LINE DNSERT LINE INSERT A LINE D ELETE RANGE DELETE A RANGE OF LINES C OPY RANGE COPY RANGE TO A SPECIFIED LINE S UBSTITUTE CHANGE ONE SPECIFIED STRING TO ANOTHER FOR A GIVEN RANGE P RINT RANGE PRINT A RANGE OF LINES TO A SPECIFIED DEVICE RETURN HIT RETURN WHEN DONE EDITING LINE EDIT THIS PARTICULAR LINE AV DISPLAY SYSTEM VARIABLES AVAILABLE FOR REPORTING THERE ARE THREE SECTIONS TO A REPORT NUMBERED AS FOLLOWS 101 199 INITIALIZATION 201 299 EXECUTION 301 399 OUTPUT RANGE FORMATS F L 100 300 200 LAST OR SINGLE LINE 204 IF THE RANGE OR LINE IS NOT GIVEN IN THE EDITOR COMMAND AVSS WILL PROMPT YOU FOR IT ALL C OMMANDS MAY BE ABBREVIATED TO THEIR FIRST
20. elector is used to locate the desired record the output is then routed to a printer connected to the terminal REPORT GENERATOR OPTION gt ENTER ENERATE REPORT REP REPORT gt ZHVL1F ENTER VERIFICATION LETTER FILE OR INDEX TO SEARCH CHILD S NAME gt 9876543 ENTER INDEX VALUES DATE NEXT SKIPPED 1 SMITH JANE A 12 4 00 9876543 IS THIS THE PERSON lt Y gt ENTER Page 2 1 RUN THIS REPORT IN THE BACKGROUND lt N gt ENTER SAVE THE OUTPUT FOR THIS REPORT lt N gt ENTER OUTPUT DEVICE T P ENTER PREPARING REPORT eeeee Be sure that the printer is turned on has the appropriate paper properly loaded and is online After a short delay a form letter will be printed 2 2 BACKGROUND RUNS In the next example a standard report is run against the first three months of records in the AVSS database After specifying the report to run the range to search over is selected In this case the report is programmed to prompt for a date range but filing number ranges name ranges cross index or person selection may also be used in other reports SYSTEM OPTION R ENTER EPORT GENERATOR REPORT GENERATOR OPTION G ENTER ENERATE REPORT REP REPORT gt ENTER 1 CAGE1X TEENAGE CROSS TAB REPORT 2 CAGE2X DEMOGRAPHIC CROSS TABULATIONS BY MOTHER S AGE SELECTION gt 1 ENTER CAGE1X TEENAGE CROSS TAB REPORT REPORT FROM DATE 1 1 2002 ENTER 1 1 2002 TO DA
21. en the database search ended Number of lines for the bottom margin Form s being searched within the database Current filing number being processed Number of lines per outage page Name of the site where the computer is located Date and time when this report started Elapsed time in seconds to scan the database Today s date Name of the person running the report Lower range limit of cross referenced index in database search Upper range limit of cross referenced index in database search Site code s being searched within the database Page A 3 APPENDIX MUMPS COMMAND REFERENCE MUMPS COMMAND WRITE SYNTAX W pc OUTPUT STRING Ivar var where the four arguments used in the command have the following meaning pc Print Control new page new line Inn tab to column nn OUTPUT STRING literal string text Ivar Local variable var Database variable from an AVSS form Il EXAMPLES W1 210 START AT COL 10 DATE TODAY 50 BW 26 W REPORT HEADER LINE 50 PAGE MUMPS COMMAND SET SYNTAX S varl expressionl var2 expression2 where varN Local variable to use in this report expressionN Any valid combination of literal strings or numbers local variables database variables operators and or functions expressing the desired value of varN EXAMPLES S LVAR 26 300250 S TEMP SE LVAR 3 4 2 SP 4A1 A 2 MUMPS COMMAND READ SYNTAX R pc INPUT
22. eport listing goes to the top of the next page This command is mostly used for formatting headers or generating titles Please note that PAGE commands begin with the second page since OUPUT is assumed to be used for the initial titles and headers Page 7 5 The TABLE command outputs the named cross tabulation using any given options The syntax for the TABLE command is as follows 301 TABLE NAME OPTIONI VALUEI OPTION2 VALUE2 Where OPTIONS are VSIZE nnn The number of spaces to use for the row values CSIZE nnn The number of spaces to use for the column values VILABEL xxx Text label to use for this variable as specified gt VI V2 V3 LAYOUT DUMP _ Display the named table in array format LAYOUT TABLE Display the named table by rows and columns SPCL OPT A list of comma delimited option codes as follows RP Row Percent CP Column Percent TP Total Percent AR Accumulate by Row AC Accumulate by Column ARP Percent Accumulate by Row ARC Percent Accumulate by Column Page 7 6 APPENDIX NAMING CONVENTIONS Note The following information is available through the use of AVSS on line help using THE FOLLOWING CONVENTIONS ARE USED FOR REPORT NAMES IN CALIFORNIA 1988 OR EARLIER RECORDS FORMS BC HB 1989 OR LATER RECORDS FORMS HCA LCA COUNTY OF OCCURRENCE DATA FORMS BC LCA F FACILITY 1 OR MORE OF OCCURRENCE DATA FORMS BC LCA H HOSPITAL OF OCCURRENCE DATA F
23. es that have been queried 94 CERTIFICATES ARE REGISTERED FROM 1 1 2002 TO 11 4 2002 THE NUMBER OF CERTIFICATES SEARCHED IS 94 90 CERTIFICATES OF THOSE HAD OTHER THAN THE SPECIFIED VALUE S LEAVING 4 THE NUMBER OF CERTIFICATES REPORTED ON IS 4 4 26 DO YOU WISH TO GROUP SEE VALUES CONTINUE OR QUIT G V C Q V ENTER MOTHER S AGE 0 19 4 SUCCESSES 90 FAILURES 4 26 BIRTH WEIGHT 2948 1 25 00 FILE 59 3076 1 25 00 FILE 87 3090 1 25 00 FILE 98 3345 1 25 00 FILE 83 DO YOU WISH TO GROUP SEE VALUES CONTINUE OR QUIT G V C Q G ENTER LOW VALUE gt 3000 ENTER HIGH VALUE gt 9999 ENTER FOR RANGE 3000 TO 9999 INCLUSIVE THERE ARE 3 DISTINCT VALUES WITH 3 ENTRIES 75 00 DO YOU WISH TO SEE THE 3 DISTINCT VALUES AND THEIR STATISTICS Y ENTER MOTHER S AGE 0 19 4 SUCCESSES 90 FAILURES 4 26 BIRTH WEIGHT 3076 1 25 00 FILE 87 3090 1 25 00 FILE 98 3345 1 25 00 FILE 83 LOW VALUE ENTER DO YOU WISH TO GROUP SEE VALUES CONTINUE OR QUIT G V C Q Q ENTER REPORT GENERATOR OPTION gt Page 4 2 CHAPTER 5 CONCEPTS To create your own customized reports you should have a general idea about how AVSS data and reports interact Each AVSS record is stored accordingly to the specific site hospital registrar etc the type of form birth certificate delivery record etc and a record number local file number patient number
24. etc Thus to retrieve data from the AVSS database you must specify the site the type of form and the specific record s that you wish to report on When you file data into AVSS each record is stored by a unique identifier called a record number In addition cross index files are created that allow you to find records by other means e g by a name or by an event date This is important to know if you wish to search a subset of your database which usually results in saving time In short there can be many ways to search your data and the computer must be instructed on method to use After specific records have been selected there are three different types of AVSS reports e INDIVIDUAL e LISTING e SUMMARY INDIVIDUAL REPORTS are used to display or print information from a single record For example the name address and demographic or medical data can be used to generate a form letter LISTING REPORTS are used to create line by line listings of selected data elements in columnar form Each line corresponds to a specific record that was selected For example you may wish to list the names addresses and birth weights of all deliveries to women under 20 years of age SUMMARY REPORTS are used to create tabulations of counts for specific values of ranges of a variable For example you may wish to report on the distribution of ages in your hospital You may also tabulate one variable against another to produce a cross tabulatio
25. f modifying each individual line The following examples demonstrate how to use the SUBSTITUTE command to replace XXX with YYY for the entire report EDITOR COMMAND gt 8 ENTER UBSTITUTE CHANGE gt XXX ENTER TO gt YYY ENTER FROM FIRST ENTER gt 306 ENTER EDITOR COMMAND S ENTER UBSTITUTE CHANGE XXX ENTER gt YYY ENTER FROM lt FIRST gt 101 L ENTER Page 6 6 6 9 PRINT The PRINT command works just like the LIST command except you are also prompted for the device where you want the report listing routed Examples are as follows EDITOR COMMAND P ENTER FROM lt FIRST gt 101 ENTER TO lt LAST gt ENTER OUTPUT DEVICE lt T gt P ENTER EDITOR COMMAND gt P 201 210 ENTER OUTPUT DEVICE lt T gt 1 ENTER 6 10 EXITING THE REPORT EDITOR Once you have completed entering and modifying your report press ENTER at the EDITOR COMMAND gt prompt AVSS will ask you whether you want to A BANDON C ONTINUE or S AVE Enter the first character of the desired option Here are some of the circumstances under which you would use these options ABANDON e You made numerous changes but decide against keeping them e You actually wanted to copy from this report and save the old one e You accidentally deleted the wrong lines CONTINUE e You accidentally press ENTER e You remember one last change you previously forgot e You want to take one last lo
26. h example will introduce you to more advanced features so that you can incrementally gain knowledge about the Report Generator The AVSS Report Generator has four sub options Generate Report Output Saved Report Query Database Report Editor Generate Report is used to run AVSS standard reports or any customized report developed using the Report Editor These reports may be run in the foreground during the current session and sent to the terminal printer or PC DOS file Alternately the report may be run in the background and retrieved at a later time Output Save Report is used to retrieve output from reports that have been saved to disk This output may then be sent to a terminal printer or PC DOS file and will remain on the disk until they are deleted This means that the reports may be viewed or printed many times However the saved reports will accumulate and consume valuable disk space until they are deleted Query Database is a relatively easy to use interactive tool for ad hoc queries It may be used to search the database using one or more variables fields from the desired form Query Database produces one dimensional tabulations after locating records that satisfy the conditions specified in the query The resulting report will indicate the records that met the final selection criteria Query Database performs relatively rapid searches depending of the size of the database and the number of conditions specified its reporti
27. le a simple MUMPS write statement is used Please refer to the Appendix for a complete syntactical description of the WRITE command The WRITE command is used to output information to your screen to your printer or to an AVSS file The four types of arguments are print controls literals Local variables and Database variables They may be used in any order separated by a comma Print controls are used for pagination line feed and tabs Literals are just printed character strings Local variables are created during the report process and are used to group data to reformat data or to perform calculations Database variables refer to stored data values They are designated by a data field identifier enclosed in curly brackets 7 3 EXAMPLE TWO LISTING REPORT Let s make some additional changes to the first example report and make a listing report out of it Initialization 101 XIND gt 0 102 FORM gt LCA 103 SEARCH gt DT 104 INIT PRIVENTER MAXIMUM BIRTHWEIGHT BW 105 INIT gt S SUM 0 BWSUM 0 106 INIT gt W NAME AND BIRTHWEIGHT LISTING DATE TODAY Execution 201 EXECUTE gt SUM SUM 1 202 SELECT gt INCLUDE 26 lt BW 203 EXECUTE gt BXSUM BWSUM 1 204 gt WIL FIRST 1A 205 EXECUTE gt W MIDDLE NAME 1B 206 EXECUTE gt W LAST NAME 1C 207 EXECUTE gt W BIRTH WEIGHT 26 Output 301 OUTPUT gt W TOTAL NUMBER OF RECORDS SUM
28. lies to those commands entered before filing with ENTER ENTER FILE Once you have completed all the desired changes pressing ENTER will file them into the computer You will then be returned to the EDITOR COMMAND gt prompt 6 5 REPLACE When you want to replace an entire line with another use the REPLACE command You may include the line you wish to insert or let AVSS prompt you for it Examples of the REPLACE command are as follows EDITOR COMMAND gt R ENTER EPLACE LINE gt 102 ENTER EDITOR COMMAND gt REPLACE 102 ENTER EDITOR COMMAND gt 102 ENTER At this point you specify report commands and parameters exactly as in the INSERT command 6 6 DELETE When you want to delete one or more lines from your report use the DELETE command This command uses the normal line number range specification either prompted or unprompted After specifying the lines to DELETE AVSS will prompt you for verification of the deleted lines This is just a safety procedure to make sure that you really want to delete those lines If you find that you accidentally deleted some desired lines and are still editing an old report you can retrieve the list lines Just ABANDON the edits of this current session and start over with the original version of the report Page 6 5 Examples of the DELETE command are as follows EDITOR COMMAND gt D ENTER ELETE FROM gt 102 ENTER TO gt 103 ENTER OK TO DELETE lt N gt Y
29. n For example you may wish to report on the beginning month of prenatal care by mother s age Page 5 1 Reports begin with a set of instructions that tell AVSS how to print or display stored information These instructions are called REPORT EDITOR commands There are three distinct phases to report generation each with its own set of REPORT EDITOR commands e INITIALIZATION e EXECUTION e OUTPUT INITIALIZATION commands are performed before AVSS searches the database As previously mentioned the REPORT EDITOR must know the site s and the type of form s that you would like to report on Or you might want to print a header of textual information at the beginning of the report Initialization commands are also used to specify the manner by which you wish to search the database EXECUTION commands are performed on each record as AVSS scans the database It is here that you perform the computations to format your data to list some variables from a particular record to add up summary values or to perform intermediate calculations OUTPUT commands are performed after AVSS has searched the database Examples include the printing summary variables or tabulations computing percentages from the final counts or displaying headers for the final output Page 5 2 6 REPORT EDITOR 6 1 COMMAND STRUCTURE At this point we will begin simulating a hands on tutorial session using AVSS It will be helpful to sign on to AVSS
30. ng format is however somewhat limited Report Editor is a more general purpose tool which allows the creation of customized reports Reports may be written in a variety of formats including form letters listings cross tabulations and summary reports Due to the complexity of this option a set of standard reports has been included in AVSS to meet many of the reporting needs for the birth certificate Page 1 1 To start running standard reports all you need to know is contained in Chapters 1 2 and 3 Later as you become more experienced you can use the Query Database option for ad hoc one dimensional tables reporting your data as described in Chapter 4 The conceptual basis for creating customized reports is discussed in Chapter 5 and Chapter 6 describes how to use the Report Editor with Chapter 7 and the Appendix serving as references We suggest that you use this manual while connected to an AVSS computer as described in the AVSS User s Manual and follow the dialogue contained herein Where applicable responses that you enter are indicated by BOLD CAPITAL LETTERS IN BRACKETS while responses from AVSS will be in SMALLER SIZED CAPITALS Refer to Table 1 1 of the AVSS User s Manual for the list of conventions used herein Page 1 2 CHAPTER 2 GENERATE REPORT 2 1 FOREGROUND RUNS AVSS has been designed to be easy to use for the most basic functions This is especially true for running pre programmed reports Standard reports
31. oae gets 6 1 Command acta fu Pea ian nie SA B REA cass 6 1 Inset stus ame dois roiv deni eost cuiu sul seeds pend 6 2 TR RM 6 3 Malibu eb S EM M et EE D D eR sea cans 6 3 6 5 6 5 6 6 6 6 l A ne 6 7 A 6 7 REPORT COMMANDS seen 7 1 O t Fa icta Ba d DM aces 7 1 Example One Individual 7 1 Example Two Listing 7 3 Example Three Summary Table 7 5 Naming Conventions ens eerie rrr reta eres A California Standard A 2 AVSS System A 3 MUMPS Command Reference 4 CHAPTER 1 INTRODUCTION The University of California s Automated Vital Statistics System AVSS is an online health information system designed to automate birth and death certificates as well as a variety of other paper forms To make use of this information a report generator has been developed to produce form letters listings cross tabulations and summary reports This manual was designed to help you learn to use the AVSS Report Generator It describes how to generate standard reports query the AVSS database and for more advanced users how to use the Report Editor Several examples will be used to illustrate specific features of the report generator Eac
32. ok before saving your report SAVE e You are done with editing the report and you want to generate it Page 6 7 7 REPORT COMMANDS 7 1 INTRODUCTION This chapter will focus on all the different types of report commands and how to use them to create the three basic report forms Individual Listing and Summary For Individual reports one record is selected from the database For Listing reports a group of records are selected and information for each one displayed For Summary reports a group of records are selected but the data is counted and or grouped into cross tabulations or some custom format Some of the REPORT GENERATOR commands use MUMPS syntax Where appropriate the syntax and usage of these commands will be explained As previously discussed there are three phases to report generation e Initialization Phase e Execution Phase e Output Phase Initialization Phase consists of the entire program set up before the database is scanned System and user variables are set to their default values The method of record selection is specified i e whether it will be based on the filing variable other cross filing index or the person selector The user is prompted for any range information if necessary according to the search method Also any headers are printed at this time Execution Phase consists of all the tasks performed while the Report Generator is searching the database This includes record selection extrac
33. one type of line edit is allowed at a time You may continue editing the desired line until you re satisfied with your changes You file these changes by pressing ENTER at the beginning of the edit prompt In summary here is a review of all the line edit commands see the AVSS User s Manual for more information Page 6 4 B BLANK Change any character to a blank This command may be repeated This command may be repeated Several B s may be strung together to blank out an entire section Please note that although only one type of line edit is normally allowed the same command may be repeated in certain area D DELETE Delete any character from the line This command may be repeated Like the BLANK edit command sever D s may be strung together to delete one section of the line IXXX INSERT Insert the desired characters XXX used as an example at the specified cursor position Only one INSERT edit command is allowed at a time However the DELETE edit command which can be repeated may be used before INSERT RXXX REPLACE Replace those characters beginning at the specified cursor position with the given string used as an example Only one REPLACE edit command is allowed at a time Q QUIT If you have made changes but found they were incorrect or you just want to start over again the QUIT edit command will give you a fresh copy of the desired line to edit in its original state Note that QUIT only app
34. pressiona follow Expressionb in the ASCII collating order In general this order is as follows Punctuation marks numbers upper case letters then lower case letters Does not follow Does not pattern match Pattern match with This is a powerful comparison operator that can be used to determine whether certain patterns exist in ExpressionA ExpressionB must be in the following format nl p2 n2 p2 where nl Number of occurrences of pl an May be used to mean any number of occurrences 1 literal string enclosed in quotes i e XXX or one of the following pattern codes E Everything N Numeric digit A Alphabetic character U Upper case character L Lower case character P Punctuation Page A 5 For example IN N Any number 3N1 2N1 4N A social security number 3N 3N 4N A telephone number 1A A Any word 1 A1 1A A Any hyphenated name I JOHN E Any string beginning with JOHN Other MUMPS operators are Plus dash Minus 3 Multiplied by slash Divided by back slash Integer divided by Modulo amp Logical AND Logical OR _ underscore Concatenate with The following MUMPS functions are useful in the Report Generator E STRING P1 P2 EXTRACT Function Extracts the substring in STRING beginning at position P and ending at position P2 If P1 and P2 are missing then both are assumed to be 1 If P2 is mis
35. s by simply entering the desired line number by itself For example EDITOR COMMAND gt 102 ENTER Page 6 3 Having specified the desired line to edit you now enter a line edit mode in which you can make changes on a character by character basis Again the question mark can be used to obtain help 102 FORM gt BC ENTER B BLANK D DELETE I INSERT R REPLACE Q QUIT START OVER SPACE TO THE DESIRED POSITION AND ENTER THE EDIT CODE Here we find some new commands referred to in Table 2 3 of the AVSS User s Manual as the Edit commands as contrasted to the REPORT EDITOR commands discussed in this section If you are an experienced AVSS user you know that the Edit Commands require that you use the space bar to move the cursor directly under the spot you wish to edit Then you enter the edit code and any new characters followed by an ENTER For example suppose you wish to change this form to use the hospital for code HB 102 FORM gt BC RHB ENTER 102 FORM gt HB Since you are replacing two characters with two characters you can use the REPLACE Edit command in this example Most of the time however you will want to delete the bad and insert the good 102 FORM gt BC DDIHB ENTER 102 FORM gt HB Il Having spaced to the desired position vou mav onlv make one change there That is vou mav not make a change and then space to another position Except for the DELETE INSERT usage shown above only
36. s function converts internal date values i e I4A for date of birth into MM DD YY format This can be useful in list reports and cross tabulations by date EXAMPLES SELECT 2 MALE SELECT 26 lt 1500 26 gt 4000 SELECT 1C SR SELECT 29 1 1 07 30 2 5 Evaluation Notes MUMPS evaluates expressions in a left to right manner regardless of operation although you can use parentheses for logical AND amp and OR conditions Numeric values beginning with 0 are considered to be strings since the leading zero is extraneous Page A 7
37. sing then it is assumed to have the value of PI This function is useful for truncating long data items in listing reports and ensuring uniform columns J NUMBER LENGTH D JUSTIFY Function Evaluates NUMBER by rounding to D decimal places and then right justifies it into a field of LENGTH number of characters If LENGTH is 0 leading blanks are omitted This function is useful in formatting percentage or rate values P STRING DL P1 P2 PIECE Function Extract the substring within STRING that is between the P1 and P2 occurrences of DL the delimiting string If P1 and P2 are missing then both are assumed to be 1 If P2 is missing then P2 is assumed to have the value of P1 This function is useful in extracting information from data items with standard formats For example use to derive the first piece namely month from DATE or P NAME to derive the first name Page A 6 S CI VALUEI C2 VALUEZ 1 VALUEn ZD DATE SELECT Function If condition is true then return VALUE Otherwise check condition C2 and if it s true return VALUE2 Continue in a similar manner until all the conditions have been checked Although not required it is a good practice to specify the last condition as always true to prevent select errors This function is most useful in the EXECUTE statement for recoding form variables into more desirable categories DATE Function Not available on all systems thi
38. ting information from individual records computing cross tabulation counts database summary counts and other computations All the commands in the execution phase are performed in a sequential manner for each record However once a record fails particular SEARCH criteria it is discarded and not further commands are executed Output Phase begins after the database search is completed At this time summary values are computed and report results are printed As mentioned earlier Phase 1 INITIALIZATION consists of lines 101 199 Phase 2 EXECUTION consists of lines 201 299 and Phase 3 OUTPUT consists of lines 301 999 The three types of reporting functions are as follows Individual Report Retrieve one record from the database and display it in another format a form letter Listing Report Retrieve a selected range of records from the database and display a certain set of variables from each record in a specified order e g daily delivery reports monthly low birth weight lists alphabetically sorted listings Summary Report Retrieve a selected range of records from the database and summarize the data for specific items These summarizations may be organized into cross tabulations i e birth weight distributions race tables age groupings etc or into a customized format i e form letter standard report etc Page 7 1 7 2 EXAMPLE ONE INDIVIDUAL REPORT Let s review the example Individual Report from Chapter 6 INITIALIZ

Download Pdf Manuals

image

Related Search

Related Contents

duomax n/ns, pn/pns - Certificazione Energetica  H24 Hardware User Guide  

Copyright © All rights reserved.
Failed to retrieve file