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

ECX359PT.m

Go to the documentation of this file.
ECX359PT ;ALB/JAM/ADL - PATCH ECX*3.0*59 Post-Init Rtn ; 10/03/03
 ;;3.0;DSS EXTRACTS;**59**;October 3, 2003
 ;
 ;Post-init routine to add new entries to:
 ;           NATIONAL CLINIC file (#728.441)
EN ;
 ;- Add new entry to file 728.441
 ;      ECXREC is in format: code^short description
 N ECXFDA,ECXERR,ECXCODE,ECXREC,CNT0,CNT1
 D BMES^XPDUTL(">>> Adding entry to the NATIONAL CLINIC (#728.441) file...")
 D MES^XPDUTL(" ")
 S (CNT0,CNT1,CNT2,CNT3)=0 K ^UTILITY("NATLCODE",$J)
 ;
 D LOADDATA   ;B/C of the large number of new codes, they are stored in numerous routines. Load all codes into
 ;             a utility global before adding to database
 D PROCESS
 D END
 Q  ;End of loading process
LOADDATA        ;Load all new codes into utility global
 ;
 S CNT=1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX^ECX359D1),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX^ECX359D2),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX^ECX359D3),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX^ECX359D4),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 F ECX=1:1 S ECXX=$P($T(NATCLIN+ECX^ECX359D5),";;",2) Q:ECXX="QUIT"  D
 . S ^UTILITY("NATLCODE",$J,CNT)=ECXX,CNT=CNT+1
 Q  ;LOADDATA
 ;
PROCESS ; Get NAT'L CLINIC records from UTL global
 S SEQ=""
 F  S SEQ=$O(^UTILITY("NATLCODE",$J,SEQ)) Q:SEQ=""  D
 . S ECXREC=^UTILITY("NATLCODE",$J,SEQ)
 . S ECXCODE=$P(ECXREC,"^")
 .; Quit w/error message if entry already exists
 . S CURREC=$$FIND1^DIC(728.441,"","X",ECXCODE)
 . I CURREC D  Q  ;Code already exists, see if it should be updated
 . . I $P(ECXREC,U,3) D  Q  ;Flag signifies that the code desc should be overlaid
 . . . S ECXFDA(728.441,CURREC_",",1)=$P(ECXREC,"^",2)
 . . . D FILE^DIE("EK","ECXFDA","ECXERR") S CNT3=CNT3+1
 . . . D BMES^XPDUTL(">>>...."_ECXCODE_"  "_$P(ECXREC,U,2)_"  UPDATED, entry already exists.")
 . . S CNT1=CNT1+1
 .; Setup field values of new entry
 . S ECXFDA(728.441,"+1,",.01)=ECXCODE
 . S ECXFDA(728.441,"+1,",1)=$P(ECXREC,"^",2)
 .; Add new entry
 . D UPDATE^DIE("E","ECXFDA","","ECXERR")
 . I '$D(ECXERR) D  Q
 . . D BMES^XPDUTL(">>>..."_ECXCODE_"  "_$P(ECXREC,U,2)_"  added to file.")
 . . S CNT0=CNT0+1
 . D BMES^XPDUTL(">>>...Unable to add "_ECXCODE_"  "_$P(ECXREC,U,2)_" to file.")
 . S CNT2=CNT2+1
 . K ECXERR  ;clean out error array b4 processing next code
 ;
 Q  ;FILEONE
END D MES^XPDUTL(" ")
 D MES^XPDUTL(" Done... Update to NATIONAL CLINIC File (#728.441).")
 D MES^XPDUTL("            "_$J(CNT0,3)_" new entries added.")
 D MES^XPDUTL("            "_$J(CNT1,3)_" were not added, already existed.")
 D MES^XPDUTL("            "_$J(CNT2,3)_" were not added, unable to add.")
 D MES^XPDUTL("            "_$J(CNT3,3)_" already existed and were updated.")
 D MES^XPDUTL(" ")
 K ^UTILITY("NATLCODE",$J)
 K CNT,CNT0,CNT1,CNT2,CNT3,CURREC,ECX,ECXCODE,ECXERR,ECXFDA,ECXREC,ECXX,SEQ
 Q
 ;
NATCLIN ;NAT'L CLINIC entry to add:
 ;;402A^PROV A V01 402 TOGUS ME
 ;;402B^PROV B V01 402 TOGUS ME
 ;;402C^PROV C V01 402 TOGUS ME
 ;;402D^PROV D V01 402 TOGUS ME
 ;;402E^PROV E V01 402 TOGUS ME
 ;;402F^PROV F V01 402 TOGUS ME
 ;;402G^PROV G V01 402 TOGUS ME
 ;;402H^PROV H V01 402 TOGUS ME
 ;;402I^PROV I V01 402 TOGUS ME
 ;;402J^PROV J V01 402 TOGUS ME
 ;;402K^PROV K V01 402 TOGUS ME
 ;;405A^PROV A V01 405 WHITE RIVER JUNCTION VT
 ;;405B^PROV B V01 405 WHITE RIVER JUNCTION VT
 ;;405C^PROV C V01 405 WHITE RIVER JUNCTION VT
 ;;405D^PROV D V01 405 WHITE RIVER JUNCTION VT
 ;;405E^PROV E V01 405 WHITE RIVER JUNCTION VT
 ;;405F^PROV F V01 405 WHITE RIVER JUNCTION VT
 ;;405G^PROV G V01 405 WHITE RIVER JUNCTION VT
 ;;405H^PROV H V01 405 WHITE RIVER JUNCTION VT
 ;;405I^PROV I V01 405 WHITE RIVER JUNCTION VT
 ;;405J^PROV J V01 405 WHITE RIVER JUNCTION VT
 ;;405K^PROV K V01 405 WHITE RIVER JUNCTION VT
 ;;436A^PROV A V19 436 FORT HARRISON MT
 ;;436B^PROV B V19 436 FORT HARRISON MT
 ;;436C^PROV C V19 436 FORT HARRISON MT
 ;;436D^PROV D V19 436 FORT HARRISON MT
 ;;436E^PROV E V19 436 FORT HARRISON MT
 ;;436F^PROV F V19 436 FORT HARRISON MT
 ;;436G^PROV G V19 436 FORT HARRISON MT
 ;;436H^PROV H V19 436 FORT HARRISON MT
 ;;436I^PROV I V19 436 FORT HARRISON MT
 ;;436J^PROV J V19 436 FORT HARRISON MT
 ;;436K^PROV K V19 436 FORT HARRISON MT
 ;;437A^PROV A V13 437 FARGO ND
 ;;437B^PROV B V13 437 FARGO ND
 ;;437C^PROV C V13 437 FARGO ND
 ;;437D^PROV D V13 437 FARGO ND
 ;;437E^PROV E V13 437 FARGO ND
 ;;437F^PROV F V13 437 FARGO ND
 ;;437G^PROV G V13 437 FARGO ND
 ;;437H^PROV H V13 437 FARGO ND
 ;;437I^PROV I V13 437 FARGO ND
 ;;437J^PROV J V13 437 FARGO ND
 ;;437K^PROV K V13 437 FARGO ND
 ;;438A^PROV A V13 438 SIOUX FALLS SD
 ;;438B^PROV B V13 438 SIOUX FALLS SD
 ;;438C^PROV C V13 438 SIOUX FALLS SD
 ;;438D^PROV D V13 438 SIOUX FALLS SD
 ;;438E^PROV E V13 438 SIOUX FALLS SD
 ;;438F^PROV F V13 438 SIOUX FALLS SD
 ;;438G^PROV G V13 438 SIOUX FALLS SD
 ;;438H^PROV H V13 438 SIOUX FALLS SD
 ;;438I^PROV I V13 438 SIOUX FALLS SD
 ;;438J^PROV J V13 438 SIOUX FALLS SD
 ;;438K^PROV K V13 438 SIOUX FALLS SD
 ;;442A^PROV A V19 442 CHEYENNE WY
 ;;442B^PROV B V19 442 CHEYENNE WY
 ;;442C^PROV C V19 442 CHEYENNE WY
 ;;442D^PROV D V19 442 CHEYENNE WY
 ;;442E^PROV E V19 442 CHEYENNE WY
 ;;442F^PROV F V19 442 CHEYENNE WY
 ;;442G^PROV G V19 442 CHEYENNE WY
 ;;442H^PROV H V19 442 CHEYENNE WY
 ;;442I^PROV I V19 442 CHEYENNE WY
 ;;442J^PROV J V19 442 CHEYENNE WY
 ;;442K^PROV K V19 442 CHEYENNE WY
 ;;459A^PROV A V21 459 HONOLULU HI
 ;;459B^PROV B V21 459 HONOLULU HI
 ;;459C^PROV C V21 459 HONOLULU HI
 ;;459D^PROV D V21 459 HONOLULU HI
 ;;459E^PROV E V21 459 HONOLULU HI
 ;;459F^PROV F V21 459 HONOLULU HI
 ;;459G^PROV G V21 459 HONOLULU HI
 ;;459H^PROV H V21 459 HONOLULU HI
 ;;459I^PROV I V21 459 HONOLULU HI
 ;;459J^PROV J V21 459 HONOLULU HI
 ;;459K^PROV K V21 459 HONOLULU HI
 ;;460A^PROV A V04 460 WILMINGTON DE
 ;;460B^PROV B V04 460 WILMINGTON DE
 ;;460C^PROV C V04 460 WILMINGTON DE
 ;;460D^PROV D V04 460 WILMINGTON DE
 ;;460E^PROV E V04 460 WILMINGTON DE
 ;;460F^PROV F V04 460 WILMINGTON DE
 ;;460G^PROV G V04 460 WILMINGTON DE
 ;;460H^PROV H V04 460 WILMINGTON DE
 ;;460I^PROV I V04 460 WILMINGTON DE
 ;;460J^PROV J V04 460 WILMINGTON DE
 ;;460K^PROV K V04 460 WILMINGTON DE
 ;;463A^PROV A V20 463 ANCHORAGE AK
 ;;463B^PROV B V20 463 ANCHORAGE AK
 ;;463C^PROV C V20 463 ANCHORAGE AK
 ;;463D^PROV D V20 463 ANCHORAGE AK
 ;;463E^PROV E V20 463 ANCHORAGE AK
 ;;463F^PROV F V20 463 ANCHORAGE AK
 ;;463G^PROV G V20 463 ANCHORAGE AK
 ;;463H^PROV H V20 463 ANCHORAGE AK
 ;;463I^PROV I V20 463 ANCHORAGE AK
 ;;463J^PROV J V20 463 ANCHORAGE AK
 ;;463K^PROV K V20 463 ANCHORAGE AK
 ;;502A^PROV A V16 502 ALEXANDRIA LA
 ;;502B^PROV B V16 502 ALEXANDRIA LA
 ;;502C^PROV C V16 502 ALEXANDRIA LA
 ;;502D^PROV D V16 502 ALEXANDRIA LA
 ;;502E^PROV E V16 502 ALEXANDRIA LA
 ;;502F^PROV F V16 502 ALEXANDRIA LA
 ;;502G^PROV G V16 502 ALEXANDRIA LA
 ;;502H^PROV H V16 502 ALEXANDRIA LA
 ;;502I^PROV I V16 502 ALEXANDRIA LA
 ;;502J^PROV J V16 502 ALEXANDRIA LA
 ;;502K^PROV K V16 502 ALEXANDRIA LA
 ;;503A^PROV A V04 503 ALTOONA PA
 ;;503B^PROV B V04 503 ALTOONA PA
 ;;503C^PROV C V04 503 ALTOONA PA
 ;;503D^PROV D V04 503 ALTOONA PA
 ;;503E^PROV E V04 503 ALTOONA PA
 ;;503F^PROV F V04 503 ALTOONA PA
 ;;503G^PROV G V04 503 ALTOONA PA
 ;;503H^PROV H V04 503 ALTOONA PA
 ;;503I^PROV I V04 503 ALTOONA PA
 ;;503J^PROV J V04 503 ALTOONA PA
 ;;503K^PROV K V04 503 ALTOONA PA
 ;;504A^PROV A V18 504 AMARILLO TX
 ;;504B^PROV B V18 504 AMARILLO TX
 ;;504C^PROV C V18 504 AMARILLO TX
 ;;504D^PROV D V18 504 AMARILLO TX
 ;;504E^PROV E V18 504 AMARILLO TX
 ;;504F^PROV F V18 504 AMARILLO TX
 ;;504G^PROV G V18 504 AMARILLO TX
 ;;504H^PROV H V18 504 AMARILLO TX
 ;;504I^PROV I V18 504 AMARILLO TX
 ;;504J^PROV J V18 504 AMARILLO TX
 ;;504K^PROV K V18 504 AMARILLO TX
 ;;506A^PROV A V11 506 ANN ARBOR MI
 ;;506B^PROV B V11 506 ANN ARBOR MI
 ;;506C^PROV C V11 506 ANN ARBOR MI
 ;;506D^PROV D V11 506 ANN ARBOR MI
 ;;506E^PROV E V11 506 ANN ARBOR MI
 ;;506F^PROV F V11 506 ANN ARBOR MI
 ;;506G^PROV G V11 506 ANN ARBOR MI
 ;;506H^PROV H V11 506 ANN ARBOR MI
 ;;506I^PROV I V11 506 ANN ARBOR MI
 ;;506J^PROV J V11 506 ANN ARBOR MI
 ;;506K^PROV K V11 506 ANN ARBOR MI
 ;;508A^PROV A V07 508 ATLANTA GA
 ;;508B^PROV B V07 508 ATLANTA GA
 ;;508C^PROV C V07 508 ATLANTA GA
 ;;508D^PROV D V07 508 ATLANTA GA
 ;;508E^PROV E V07 508 ATLANTA GA
 ;;508F^PROV F V07 508 ATLANTA GA
 ;;508G^PROV G V07 508 ATLANTA GA
 ;;508H^PROV H V07 508 ATLANTA GA
 ;;508I^PROV I V07 508 ATLANTA GA
 ;;508J^PROV J V07 508 ATLANTA GA
 ;;508K^PROV K V07 508 ATLANTA GA
 ;;509A^PROV A V07 509 AUGUSTA GA
 ;;509B^PROV B V07 509 AUGUSTA GA
 ;;509C^PROV C V07 509 AUGUSTA GA
 ;;509D^PROV D V07 509 AUGUSTA GA
 ;;509E^PROV E V07 509 AUGUSTA GA
 ;;509F^PROV F V07 509 AUGUSTA GA
 ;;509G^PROV G V07 509 AUGUSTA GA
 ;;509H^PROV H V07 509 AUGUSTA GA
 ;;509I^PROV I V07 509 AUGUSTA GA
 ;;509J^PROV J V07 509 AUGUSTA GA
 ;;509K^PROV K V07 509 AUGUSTA GA
 ;;512A^PROV A V05 512 MARYLAND HCS
 ;;512B^PROV B V05 512 MARYLAND HCS
 ;;512C^PROV C V05 512 MARYLAND HCS
 ;;512D^PROV D V05 512 MARYLAND HCS
 ;;512E^PROV E V05 512 MARYLAND HCS
 ;;512F^PROV F V05 512 MARYLAND HCS
 ;;512G^PROV G V05 512 MARYLAND HCS
 ;;512H^PROV H V05 512 MARYLAND HCS
 ;;512I^PROV I V05 512 MARYLAND HCS
 ;;512J^PROV J V05 512 MARYLAND HCS
 ;;512K^PROV K V05 512 MARYLAND HCS
 ;;QUIT