Changeset 66


Ignore:
Timestamp:
Jul 17, 2008, 12:01:47 AM (16 years ago)
Author:
Sam Habiel
Message:

Updated to a working CCRVA200 file

Location:
ccr/trunk/p
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/CCRVA200.m

    r62 r66  
    11CCRVA200 ;WV/CCDCCR/SMH - Routine to get Provider Data;07/13/2008
    22        ;;0.1;CCDCCR;;JUL 13, 2007;Build 0
    3 
     3        Q
    44        ; This routine uses Kernel APIs and Direct Global Access to get
    55        ; Proivder Data from File 200.
     
    6464        Q:+STR<0 ""
    6565        ; Sometimes we have 3 pieces, or 2. Deal with that.
    66         Q:$L($P(STR,U,4)) $P(STR,U,2)_"/"_$P(STR,U,3)_"/"_$P(STR,U,4)
    67         Q $P(STR,U,2)_"/"_$P(STR,U,3)
     66        Q:$L($P(STR,U,4)) $P(STR,U,2)_"-"_$P(STR,U,3)_"-"_$P(STR,U,4)
     67        Q $P(STR,U,2)_"-"_$P(STR,U,3)
    6868        ;
    6969ADDTYPE(DUZ) ; Get Address Type, PUBLIC; EXTRINSIC
     
    7272        Q "Work"
    7373        ;
     74ADDLINE1(DUZ) ; Get Address associated with this instituation; PUBLIC; EXTRINSIC
     75        ; INPUT: DUZ ByVal
     76        ; Output: String.
    7477
     78        ; First, get site number from the institution file.
     79        ; 1st piece returned by $$SITE^VASITE, which gets the system institution
     80        N INST S INST=$P($$SITE^VASITE(),U)
     81
     82        ; Second, get mailing address
     83        ; There are two APIs to get the address, one for physical and one for
     84        ; mailing. We will check if mailing exists first, since that's the
     85        ; one we want to use; then check for physical. If neither exists,
     86        ; then we return nothing. We check for the existence of an address
     87        ; by the length of the returned string.
     88        ; NOTE: API doesn't support Address 2, so I won't even include it
     89        ; in the template.
     90        N ADD
     91        S ADD=$$MADD^XUAF4(INST) ; mailing address
     92        Q:$L(ADD) $P(ADD,U)
     93        S ADD=$$PADD^XUAF4(INST) ; physical address
     94        Q:$L(ADD) $P(ADD,U)
     95        Q ""
     96        ;
     97CITY(DUZ) ; Get City for Institution. PUBLIC; EXTRINSIC
     98        ; INPUT: DUZ ByVal
     99        ; Output: String.
     100        ; See ADD1 for comments
     101        N INST S INST=$P($$SITE^VASITE(),U)
     102        N ADD
     103        S ADD=$$MADD^XUAF4(INST) ; mailing address
     104        Q:$L(ADD) $P(ADD,U,2)
     105        S ADD=$$PADD^XUAF4(INST) ; physical address
     106        Q:$L(ADD) $P(ADD,U,2)
     107        Q ""
     108        ;
     109STATE(DUZ) ; Get State for Institution. PUBLIC; EXTRINSIC
     110        ; INPUT: DUZ ByVal
     111        ; Output: String.
     112        ; See ADD1 for comments
     113        N INST S INST=$P($$SITE^VASITE(),U)
     114        N ADD
     115        S ADD=$$MADD^XUAF4(INST) ; mailing address
     116        Q:$L(ADD) $P(ADD,U,3)
     117        S ADD=$$PADD^XUAF4(INST) ; physical address
     118        Q:$L(ADD) $P(ADD,U,3)
     119        Q ""
     120        ;
     121POSTCODE(DUZ) ; Get Postal Code for Institution. PUBLIC; EXTRINSIC
     122        ; INPUT: DUZ ByVal
     123        ; OUTPUT: String.
     124        ; See ADD1 for comments
     125        N INST S INST=$P($$SITE^VASITE(),U)
     126        N ADD
     127        S ADD=$$MADD^XUAF4(INST) ; mailing address
     128        Q:$L(ADD) $P(ADD,U,4)
     129        S ADD=$$PADD^XUAF4(INST) ; physical address
     130        Q:$L(ADD) $P(ADD,U,4)
     131        Q ""
     132        ;
     133TEL(DUZ) ; Get Office Phone number. PUBLIC; EXTRINSIC
     134        ; INPUT: DUZ ByVal
     135        ; OUTPUT: String.
     136        ; Direct global access
     137        N TEL S TEL=$G(^VA(200,DUZ,.13))
     138        Q $P(TEL,U,2)
     139        ;
     140TELTYPE(DUZ) ; Get Telephone Type. PUBLIC; EXTRINSIC
     141        ; INPUT: DUZ ByVal
     142        ; OUTPUT: String.
     143        Q "Office"
     144        ;
     145EMAIL(DUZ) ; Get Provider's Email. PUBLIC; EXTRINSIC
     146        ; INPUT: DUZ ByVal
     147        ; OUTPUT: String
     148        ; Direct global access
     149        N EMAIL S EMAIL=$G(^VA(200,DUZ,.15))
     150        Q $P(EMAIL,U)
     151        ;
     152
  • ccr/trunk/p/GPLCCR0.m

    r63 r66  
    10261026 ;;</Type>
    10271027 ;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
    1028  ;;<Line2>@@ACTORADDRESSLINE2@@</Line2>
    10291028 ;;<City>@@ACTORADDRESSCITY@@</City>
    10301029 ;;<State>@@ACTORADDRESSSTATE@@</State>
Note: See TracChangeset for help on using the changeset viewer.