- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORSNAST.m
r628 r636 1 ORSNAST ;SLC/RAF - Policy order search ;06/25/2007 2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**50,263**;Dec 17, 1997;Build 9 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 1 ORSNAST ;SLC/RAF - Policy order search ;10/20/00 14:10 2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**50**;Dec 17, 1997 4 3 ; 5 4 ;this utility will allow the user to enter a date range to search … … 11 10 S U="^" K ^TMP("ORNS",$J),^TMP("ORSERV",$J) 12 11 W @IOF,!!?18,"Nature of Order or Order Status Search.",!?15,"This report is formatted for 132 column output." 13 N DASH,DATE,DFN,DIR,DTOUT,DUOUT,ED ATE,FORMAT,HDR,HDR1,IEN14 N LOC,LONER,ORIGVIEW,PAGE,PNM,PROV,QUIT,REF,RPDT,SD ATE,SER,SERVICE,STOP,TEXT,TEXTSUB12 N DASH,DATE,DFN,DIR,DTOUT,DUOUT,ED1,EDATE,FORMAT,HDR,HDR1,IEN 13 N LOC,LONER,ORIGVIEW,PAGE,PNM,PROV,QUIT,REF,RPDT,SD1,SDATE,SER,SERVICE,STOP,TEXT,TEXTSUB 15 14 N SINGLE,SIGNED,SNAME,SSN,STATUS,SORT,SEARCH,SUB 16 15 N VA,VADM,WHEN,WHO,Y … … 22 21 S DIR("A")="Select "_$S(SORT=1:"Nature of order: ",1:"Order Status: ") 23 22 D ^DIR S:+Y>0 SEARCH=+Y,SNAME=$P(Y,U,2) K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT 24 D SDATE I $D(DTOUT)!$D(DUOUT) G EXIT 25 D EDATE I $D(DTOUT)!$D(DUOUT) G EXIT 26 D CKDATE I $D(DTOUT)!$D(DUOUT) G EXIT 23 SDATE ;sets DIR call to ask the user for a starting date 24 S DIR(0)="DA^::ETX" 25 S DIR("A")="Enter a starting date: " 26 S DIR("?")="Enter the date that you wish to start searching with. This date needs to be older than the ending date. For example: If you enter a start date of T-3, the Stop date should be T-2 or less. Enter an ^ to exit the option." 27 D ^DIR S:+Y>0 (SDATE,SD1)=+Y K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT 28 I SDATE'["." S (SDATE,SD1)=SDATE_.2359 29 I $D(DTOUT)!$D(DUOUT) G EXIT 30 EDATE ;sets DIR call to ask the user for an ending date (optional) 31 S DIR(0)="DA^::ETX" 32 S DIR("A")="Enter a ending date: " 33 S DIR("?")="Enter the date that you would like the search to end with. This date needs to be more recent than the start date. For example: If you entered a T-3 for the start date, enter a T-2 or less here. Enter an ^ to exit the option." 34 D ^DIR S:+Y>0 (EDATE,ED1)=+Y K DIR I $D(DTOUT)!($D(DUOUT)) G EXIT 35 I EDATE'["." S (EDATE,ED1)=EDATE_.0001 36 I $D(DTOUT)!$D(DUOUT) G EXIT 37 SWITCH ;takes the date input from the user and does a switcheroo so the program 38 ;can work as intended 39 I EDATE'>SDATE S EDATE=SD1,SDATE=ED1 27 40 FORMAT ;allows choice of formats for evaluation purpose 28 41 S DIR(0)="SX^1:Detailed format;2:Columnar format" … … 60 73 .D ^%ZTLOAD I $D(ZTSK) W !,?32,"REQUEST QUEUED" 61 74 U IO D EN^ORSNAST1 62 G EXIT63 75 ; 64 SDATE ;sets DIR call to ask the user for a starting date65 S DIR(0)="DA^::ETX"66 S DIR("A")="Enter a starting date: "67 S DIR("?")="Enter the date that you wish to start searching with. This date needs to be older than the ending date. For example: If you enter a start date of T-3, the Stop date should be T-2 or less. Enter an ^ to exit the option."68 D ^DIR S:+Y>0 SDATE=+Y K DIR I $D(DTOUT)!($D(DUOUT)) Q69 I SDATE'["." S SDATE=SDATE_.000170 Q71 EDATE ;sets DIR call to ask the user for an ending date (optional)72 S DIR(0)="DA^::ETX"73 S DIR("A")="Enter a ending date: "74 S DIR("?")="Enter the date that you would like the search to end with. This date needs to be more recent than the start date. For example: If you entered a T-3 for the start date, enter a T-2 or less here. Enter an ^ to exit the option."75 D ^DIR S:+Y>0 EDATE=+Y K DIR I $D(DTOUT)!($D(DUOUT)) Q76 I EDATE'["." S EDATE=EDATE_.235977 Q78 CKDATE ; Make sure the end date is not older than the start date.79 I EDATE>SDATE Q80 W !!,?10,"The starting date must be older than the ending date.",!,?10,"Please re-enter start and end dates.",!!81 D SDATE I $D(DTOUT)!$D(DUOUT) Q82 D EDATE I $D(DTOUT)!$D(DUOUT) Q83 G CKDATE84 76 EXIT ; 85 77 K ^TMP("ORNS",$J),^TMP("ORSERV",$J)
Note:
See TracChangeset
for help on using the changeset viewer.