[613] | 1 | EC725P ;BIR/CML,JPW-Post Updates in Files 725 and 723 ;28 Aug 96
|
---|
| 2 | ;;2.0; EVENT CAPTURE ;**2,4,5,10**;8 May 96
|
---|
| 3 | ;
|
---|
| 4 | ;
|
---|
| 5 | EN ;- Entry point for post-init
|
---|
| 6 | ;
|
---|
| 7 | D CRESPEC^EC725P()
|
---|
| 8 | Q
|
---|
| 9 | ;
|
---|
| 10 | ;
|
---|
| 11 | CRESPEC(LABEL) ;patch 5 - add new records to file #723
|
---|
| 12 | ;
|
---|
| 13 | ;- Added LABEL parameter for patch EC*2*10 so code can be reused in future
|
---|
| 14 | N DIC,X,Y,J,ERR,MSG,CNT,BAD,SAVEY,GOOD
|
---|
| 15 | S CNT=0,BAD=1
|
---|
| 16 | S LABEL=$G(LABEL)
|
---|
| 17 | S MSG="Adding entries to Medical Specialty file (#723)......"
|
---|
| 18 | D BMES^XPDUTL(MSG)
|
---|
| 19 | ;
|
---|
| 20 | ;- If LABEL not defined, use MEDSPEC line tag as default
|
---|
| 21 | S:(LABEL="") LABEL="MEDSPEC"
|
---|
| 22 | ;
|
---|
| 23 | ;check for existing exact match; don't add if there already
|
---|
| 24 | F J=1:1 S X=$P($T(@LABEL+J),";;",2) Q:X="END" D
|
---|
| 25 | . K Y
|
---|
| 26 | . S DIC="^ECC(723,"
|
---|
| 27 | . S DIC(0)="X"
|
---|
| 28 | . D ^DIC
|
---|
| 29 | . S SAVEY=+Y
|
---|
| 30 | . I SAVEY>0 D
|
---|
| 31 | .. S MSG=">>> You already have a "_X_" record. New entry not created."
|
---|
| 32 | .. D BMES^XPDUTL(MSG)
|
---|
| 33 | .. S BAD=BAD+1,ERR(BAD)=X
|
---|
| 34 | . I SAVEY=-1 D
|
---|
| 35 | .. K DD,DO,Y
|
---|
| 36 | .. D FILE^DICN
|
---|
| 37 | .. I Y=-1 S BAD=BAD+1,ERR(BAD)=X
|
---|
| 38 | .. I +Y>0 S CNT=CNT+1,GOOD(CNT)=$P(Y,"^",2)
|
---|
| 39 | ;
|
---|
| 40 | ;- Let the user know what happened
|
---|
| 41 | D MES^XPDUTL("")
|
---|
| 42 | ;
|
---|
| 43 | ;- Display entries which weren't created
|
---|
| 44 | I $D(ERR) D
|
---|
| 45 | .S ERR(1)="The following entries could not be created in file #723:"
|
---|
| 46 | .D BMES^XPDUTL(.ERR)
|
---|
| 47 | ;
|
---|
| 48 | ;- Display entries successfully added
|
---|
| 49 | I CNT>0 D
|
---|
| 50 | . D MES^XPDUTL("")
|
---|
| 51 | . S MSG="Completed...... a total of "_CNT_" entries were added to file #723."
|
---|
| 52 | . D BMES^XPDUTL(MSG)
|
---|
| 53 | . S MSG="The following entries have been added:"
|
---|
| 54 | . D BMES^XPDUTL(MSG)
|
---|
| 55 | . D BMES^XPDUTL(.GOOD)
|
---|
| 56 | D MES^XPDUTL("")
|
---|
| 57 | Q
|
---|
| 58 | ;
|
---|
| 59 | ;
|
---|
| 60 | MEDSPEC ;- New medical specialties to be added
|
---|
| 61 | ;;NURSING
|
---|
| 62 | ;;RADIOLOGY
|
---|
| 63 | ;;END
|
---|
| 64 | ;
|
---|
| 65 | ;
|
---|
| 66 | NEW723 ;#.01 fields for new records
|
---|
| 67 | ;;OUTPATIENT CLINIC
|
---|
| 68 | ;;C&P REQUESTS
|
---|
| 69 | ;;VETERAN CENTER
|
---|
| 70 | ;;DAY TREATMENT CENTER
|
---|
| 71 | ;;PAIN CLINIC
|
---|
| 72 | ;;EMPLOYEE HEALTH
|
---|
| 73 | ;;NUTRITION AND FOOD SERVICE
|
---|