Changeset 78 for ccr/trunk/p/GPLACTORS.m


Ignore:
Timestamp:
Jul 29, 2008, 4:57:24 PM (16 years ago)
Author:
George Lilly
Message:

improved handling of missing SSN and telephone values

File:
1 edited

Legend:

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

    r75 r78  
    1717 ;with this program; if not, write to the Free Software Foundation, Inc.,
    1818 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    19            ;
    20            ;  PROCESS THE ACTORS SECTION OF THE CCR
    21                    ;
    22                    ; ===Revision History===
    23                    ; 0.1 Initial Writing of Skeleton--GPL
    24                    ; 0.2 Patient Data Extraction--SMH
    25                    ; 0.3 Information System Info Extraction--SMH
    26            ;
     19    ;
     20    ;  PROCESS THE ACTORS SECTION OF THE CCR
     21    ;
     22    ; ===Revision History===
     23    ; 0.1 Initial Writing of Skeleton--GPL
     24    ; 0.2 Patient Data Extraction--SMH
     25    ; 0.3 Information System Info Extraction--SMH
     26    ;
    2727EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE
    28            ; IPXML is the Input Actor Template into which we are going to substitute values
    29                    ; This is straight XML. Values to be substituted are in @@VAL@@ format.
     28  ; IPXML is the Input Actor Template into which we  substitute values
     29  ; This is straight XML. Values to be substituted are in @@VAL@@ format.
     30  ; ALST is the actor list global generated by ACTLST^GPLCCR and has format:
     31  ; ^TMP(7542,1,"ACTORS",0)=Count
     32  ; ^TMP(7542,1,"ACTORS",n)="ActorID^ActorType^ActorIEN"
     33  ; ActorType is an enum containing either "PROVIDER" "PATIENT" "SYSTEM"
    3034
    31                    ; ALST is the actor list global generated by ACTLST^GPLCCR and is in the following format
    32                    ; ^TMP(7542,1,"ACTORS",0)=Count
    33                    ; ^TMP(7542,1,"ACTORS",n)="ActorID^ActorType^ActorIEN"
    34                    ; ActorType is an enum containing either "PROVIDER" "PATIENT" "SYSTEM"
    35 
    36            ; AXML is the output arrary, to contain XML.
     35  ; AXML is the output arrary, to contain XML.
    3736
    3837           N I,J,AMAP,AOID,ATYP,AIEN
     
    9089     S @AMAP@("ACTORDATEOFBIRTH")=$$DOB^CCRDPT
    9190     S @AMAP@("ACTORGENDER")=$$GENDER^CCRDPT
    92      S @AMAP@("ACTORSSN")=$$SSN^CCRDPT
    93      S @AMAP@("ACTORSSNSOURCEID")=AOID
     91     S @AMAP@("ACTORSSN")=""
     92     S @AMAP@("ACTORSSNTEXT")=""
     93     S @AMAP@("ACTORSSNSOURCEID")=""
     94     S ZX=$$SSN^CCRDPT
     95     I ZX'="" D  ; IF THERE IS A SSN IN THE RECORD
     96     . S @AMAP@("ACTORSSN")=ZX
     97     . S @AMAP@("ACTORSSNTEXT")="SSN"
     98     . S @AMAP@("ACTORSSNSOURCEID")=AOID
    9499     S @AMAP@("ACTORADDRESSTYPE")=$$ADDRTYPE^CCRDPT
    95100     S @AMAP@("ACTORADDRESSLINE1")=$$ADDR1^CCRDPT
     
    98103     S @AMAP@("ACTORADDRESSSTATE")=$$STATE^CCRDPT
    99104     S @AMAP@("ACTORADDRESSZIPCODE")=$$ZIP^CCRDPT
    100      S @AMAP@("ACTORRESTEL")=$$RESTEL^CCRDPT
    101      S @AMAP@("ACTORWORKTEL")=$$WORKTEL^CCRDPT
    102          S @AMAP@("ACTORCELLTEL")=$$CELLTEL^CCRDPT
     105     S @AMAP@("ACTORRESTEL")=""
     106     S @AMAP@("ACTORRESTELTEXT")=""
     107     S ZX=$$RESTEL^CCRDPT
     108     I ZX'="" D  ; IF THERE IS A RESIDENT PHONE IN THE RECORD
     109     . S @AMAP@("ACTORRESTEL")=ZX
     110     . S @AMAP@("ACTORRESTELTEXT")="Residential Telephone"
     111     S @AMAP@("ACTORWORKTEL")=""
     112     S @AMAP@("ACTORWORKTELTEXT")=""
     113     S ZX=$$WORKTEL^CCRDPT
     114     I ZX'="" D  ; IF THERE IS A RESIDENT PHONE IN THE RECORD
     115     . S @AMAP@("ACTORWORKTEL")=ZX
     116     . S @AMAP@("ACTORWORKTELTEXT")="Work Telephone"
     117     S @AMAP@("ACTORCELLTEL")=""
     118     S @AMAP@("ACTORCELLTELTEXT")=""
     119     S ZX=$$CELLTEL^CCRDPT
     120     I ZX'="" D  ; IF THERE IS A CELL PHONE IN THE RECORD
     121     . S @AMAP@("ACTORCELLTEL")=ZX
     122     . S @AMAP@("ACTORCELLTELTEXT")="Cell Phone"
    103123     S @AMAP@("ACTOREMAIL")=$$EMAIL^CCRDPT
    104124     S @AMAP@("ACTORADDRESSSOURCEID")=AOID
    105125     S @AMAP@("ACTORIEN")=AIEN
    106      S @AMAP@("ACTORSUFFIXNAME")="" ; DOES VISTA STORE THE SUFFIX?
     126     S @AMAP@("ACTORSUFFIXNAME")="" ; DOES VISTA STORE THE SUFFIX
     127     S @AMAP@("ACTORSOURCEID")="ACTORSYSTEM_1" ; THE SYSTEM IS THE SOURCE
    107128         D DESTROY^CCRDPT
    108129     D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE
     
    130151     S @AMAP@("ACTORRELATION")=""
    131152     S @AMAP@("ACTORRELATIONSOURCEID")=""
     153     S @AMAP@("ACTORSOURCEID")="ACTORSYSTEM_1" ; THE SYSTEM IS THE SOURCE
    132154     D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE
    133155     Q
     
    163185     S @AMAP@("ACTORADDRESSSTATE")=$$STATE^CCRVA200(AIEN)
    164186     S @AMAP@("ACTORPOSTALCODE")=$$POSTCODE^CCRVA200(AIEN)
    165      S @AMAP@("ACTORTELEPHONE")=$$TEL^CCRVA200(AIEN)
    166      S @AMAP@("ACTORTELEPHONETYPE")=$$TELTYPE^CCRVA200(AIEN)
     187     S @AMAP@("ACTORTELEPHONE")=""
     188     S @AMAP@("ACTORTELEPHONETYPE")=""
     189     S ZX=$$TEL^CCRVA200(AIEN)
     190     I ZX'="" D  ; THERE IS A PHONE NUMBER AVAILABLE
     191     . S @AMAP@("ACTORTELEPHONE")=ZX
     192     . S @AMAP@("ACTORTELEPHONETYPE")=$$TELTYPE^CCRVA200(AIEN)
    167193     S @AMAP@("ACTOREMAIL")=$$EMAIL^CCRVA200(AIEN)
    168194     S @AMAP@("ACTORADDRESSSOURCEID")="ACTORSYSTEM_1"
     195     S @AMAP@("ACTORSOURCEID")="ACTORSYSTEM_1" ; THE SYSTEM IS THE SOURCE
    169196     D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE
    170197     Q
Note: See TracChangeset for help on using the changeset viewer.