Changeset 158 for ccr


Ignore:
Timestamp:
Sep 21, 2008, 6:29:04 PM (16 years ago)
Author:
Sam Habiel
Message:

CCRMED a testing version

File:
1 edited

Legend:

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

    r128 r158  
    118118          . S @MAP@("MEDDIRECTIONROUTETEXT")=$$GET1^DIQ(51.2,$P(SIGDATA,U,7),.01)
    119119          . S @MAP@("MEDFREQUENCYVALUE")=$P(SIGDATA,U,7)
    120           . S @MAP@("MEDFREQUENCYUNIT")
    121           . S @MAP@("MEDINTERVALVALUE")
    122           . S @MAP@("MEDINTERVALUNIT")
     120          . ; Invervals... again another call.
     121          . ; In the wisdom of the original programmers, the schedule is a free text field
     122          . ; However, it gets translated by a call to the administration schedule file
     123          . ; to see if that schedule exists.
     124          . ; That's the same thing I am going to do.
     125          . ; The call is AP^PSS51P1(PSSPP,PSSFT,PSSWDIEN,PSSSTPY,LIST,PSSFREQ).
     126          . ; PSSPP is "PSJ" (for some reason, schedules are stored as PSJ, not PSO--
     127          . ; I looked), PSSFT is the name, and list is the ^TMP name to store the data in.
     128          . ; So...
     129          . D AP^PSS51P1("PSJ",$P(SIGDATA,U,7),,,"SCHEDULE")
     130          . N SCHEDATA M SCHEDATA=^TMP($J,"SCHEDULE")
     131          . N INTERVAL
     132          . I SCHEDATA(0)=-1 S INTERVAL=""
     133          . E  D
     134          . . N SUB S SUB=$O(SCHEDATA(0))
     135          . . S INTERVAL=SCHEDATA(SUB,2)
     136          . S @MAP@("MEDINTERVALVALUE")=INTERVAL
     137          . S @MAP@("MEDINTERVALUNIT")="Minute"
    123138          . S @MAP@("MEDDURATIONVALUE")=$P(SIGDATA,U,5)
    124           . S @MAP@("MEDDURATIONUNIT")
    125           . S @MAP@("MEDPRNFLAG")
     139          . S @MAP@("MEDDURATIONUNIT")=""
     140          . S @MAP@("MEDPRNFLAG")=$P(SIGDATA,U,7)["PRN"
    126141          . S @MAP@("MEDPROBLEMOBJECTID")=""
    127142          . S @MAP@("MEDPROBLEMDESCRIPTION")=""
     
    136151          . ; --- END OF DIRECTIONS ---
    137152          . ;
    138           . S @MAP@("MEDPTINSTRUCTIONS")
    139           . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")
     153          . ; ^PSRX(22,"INS1",1,0)="FOR BLOOD PRESSURE"
     154          . S @MAP@("MEDPTINSTRUCTIONS")=^PSRX(RXIEN,"INS1",1,0)
     155          . ; ^PSRX(22,"PRC",1,0)="Pharmacist: you must obey my command"
     156          . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=^PSRX(RXIEN,"PRC",1,0)
    140157          . S @MAP@("MEDRFNO")=MED(9)
    141158          . N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"RESULT",J))
Note: See TracChangeset for help on using the changeset viewer.