Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/uCore.pas

    r830 r1679  
    77interface
    88
    9 uses SysUtils, Windows, Classes, Forms, ORFn, rCore, uConst, ORClasses;
     9uses SysUtils, Windows, Classes, Forms, ORFn, rCore, uConst, ORClasses, uCombatVet;
    1010
    1111type
     
    8686    FRestricted: Boolean;                        // True if this is a restricted record
    8787    FInpatient:  Boolean;                        // True if that patient is an inpatient
     88    FStatus:     string;                         // Patient status indicator (Inpatient or Outpatient)
    8889    FLocation:   Integer;                        // IEN in Hosp Loc if inpatient
    8990    FWardService: string;
     
    9596    FPrimProv:   string;                         // name of primary care provider
    9697    FAttending:  string;                         // if inpatient, name of attending
     98    FAssociate:  string;                         // if inpatient, name of associate
    9799    FDateDied: TFMDateTime;                      // Date of Patient Death (<=0 or still alive)
    98100    FDateDiedLoaded: boolean;                    // Used to determine of DateDied has been loaded
    99     //vwpt  HRN
    100     FHRN:  string ;                              //HRN
    101     FAltHRN : string ;                           //alternate HRN (future)
    102     //end vwpt
     101    FCombatVet : TCombatVet;                     // Object Holding CombatVet Data
    103102    procedure SetDFN(const Value: string);
    104     function GetDateDied: TFMDateTime;       // *DFN*
     103    function GetDateDied: TFMDateTime;
     104    function GetCombatVet: TCombatVet;       // *DFN*
    105105  public
    106106    procedure Clear;
     107    destructor Destroy; override;
    107108    property DFN:              string      read FDFN write SetDFN;  //*DFN*
    108109    property ICN:              string      read FICN;
     
    114115    property CWAD:             string      read FCWAD;
    115116    property Inpatient:        Boolean     read FInpatient;
     117    property Status:           string      read FStatus;
    116118    property Location:         Integer     read FLocation;
    117119    property WardService:      string      read FWardService;
     
    124126    property PrimaryProvider:  string      read FPrimProv;
    125127    property Attending:        string      read FAttending;
    126     //vwpt HRN AltHRN
    127     property HRN:              string      read FHRN ;
    128     property AltHRN:           string      read FAltHRN;
    129     //end vwpt
     128    property Associate:        string      read FAssociate;
     129    property CombatVet:        TCombatVet  read GetCombatVet;
    130130  end;
    131131
     
    183183    FParentID : string;
    184184    FUser     : Int64;
    185     FOrderDG  : String;
     185    FOrderDG   : String;
    186186    FDCOrder  : boolean;
    187187    FDelay    : boolean;
     
    218218    destructor Destroy; override;
    219219    procedure Add(ItemType: Integer; const AnID, ItemText, GroupName: string; SignState: Integer; AParentID: string = '';
    220                   User: int64 = 0; OrderDG: String = ''; DCOrder: boolean = FALSE; Delay: boolean = FALSE);
     220                  User: int64 = 0; OrderDG: String = ''; DCOrder: boolean = FALSE; Delay: boolean = False);
    221221    procedure Clear;
    222222    function CanSign: Boolean;
     
    246246    //AlertData: string;
    247247    RecordID: string;
     248    HighLightSection: String;
    248249  end;
    249250
     
    257258    function GetFollowUp: Integer;
    258259    function GetAlertData: string;
     260    function GetHighLightSection: String; //CB
    259261    function GetRecordID: string;
    260262    function GetText: string;
     
    262264    constructor Create;
    263265    destructor Destroy; override;
    264     procedure Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string);  //*DFN*
     266    procedure Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string; AHighLightSection : string = '');  //*DFN*  CB
    265267    procedure Clear;
    266268    procedure Next;
     
    274276    property RecordID: string  read GetRecordID;
    275277    property Text:     string  read GetText;
     278    property HighLightSection: String read GetHighLightSection; //cb
    276279  end;
    277280
     
    727730  FRestricted  := False;
    728731  FInpatient   := False;
     732  FStatus      := '';
    729733  FLocation    := 0;
    730734  FWardService := '';
     
    736740  FPrimProv    := '';
    737741  FAttending   := '';
    738   //vwpt hrn althrn
    739   FHRN         := '';
    740   FAltHRN      := '';
    741   //end vwpt
     742  FreeAndNil(FCombatVet);
     743end;
     744
     745destructor TPatient.Destroy;
     746begin
     747  FreeAndNil(FCombatVet);
     748  inherited;
     749end;
     750
     751function TPatient.GetCombatVet: TCombatVet;
     752begin
     753  if FCombatVet = nil then
     754    FCombatVet := TCombatVet.Create(FDFN);
     755  Result := FCombatVet;
    742756end;
    743757
     
    770784  FRestricted := PtSelect.Restricted;
    771785  FInpatient  := Length(PtSelect.Location) > 0;
     786  if FInpatient then FStatus := ' (INPATIENT)'
     787  else FStatus := ' (OUTPATIENT)';
    772788  FWardService :=PtSelect.WardService;
    773789  FLocation   := PtSelect.LocationIEN;
     
    779795  FPrimProv   := PtSelect.PrimaryProvider;
    780796  FAttending  := PtSelect.Attending;
    781   //vwpt HRN ALTHRN
    782   FHRN        := PtSelect.HRN;
    783   FAltHRN     := PtSelect.AltHRN;
    784   //end vwpt
     797  FAssociate  := PtSelect.Associate;
    785798end;
    786799
     
    12871300  i, CanSign(*, OrderUser*): Integer;
    12881301  OrderUser: int64;
    1289   AnID: string;
     1302  AnID, Display: string;
    12901303  HaveOrders, OtherOrders: TStringList;
    12911304  AChangeItem: TChangeItem;
     1305  IsDiscontinue, IsDelay: boolean;
    12921306begin
    12931307  if Patient.DFN = '' then Exit;
     
    13111325      if Piece(OtherOrders[i],U,2) = '' then OrderUser := 0
    13121326      else OrderUser := StrtoInt64(Piece(OtherOrders[i],U,2));
    1313       Add(CH_ORD, AnID, TextForOrder(AnID), 'Other Unsigned', CanSign,'', OrderUser);
     1327      //agp change the M code to pass back the value for the new order properties
     1328      Display := Piece(OtherOrders[i],U,3);
     1329      if Piece(OtherOrders[i],U,4) = '1' then  IsDiscontinue := True
     1330      else IsDiscontinue := False;
     1331      if Piece(OtherOrders[i],U,5) = '1' then  IsDelay := True
     1332      else IsDelay := False;
     1333      Add(CH_ORD, AnID, TextForOrder(AnID), 'Other Unsigned', CanSign,'', OrderUser, Display, IsDiscontinue, IsDelay);
    13141334    end;
    13151335  finally
     
    13361356end;
    13371357
    1338 procedure TNotifications.Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string);  //*DFN*
     1358procedure TNotifications.Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string; AHighLightSection : string = '');  //*DFN*
    13391359var
    13401360  NotifyItem: TNotifyItem;
     
    13441364  NotifyItem.FollowUp := AFollowUp;
    13451365  NotifyItem.RecordID := ARecordId;
     1366  If AHighLightSection <> '' then NotifyItem.HighLightSection := AHighLightSection;
    13461367  FList.Add(NotifyItem);
    13471368  FActive := True;
     
    13871408    else Result := '';
    13881409end;
     1410
     1411function TNotifications.GetHighLightSection: String; //CB
     1412begin
     1413  if FNotifyItem <> nil then Result := FNotifyItem.HighLightSection else Result := '';
     1414end;
     1415
    13891416
    13901417procedure TNotifications.Next;
Note: See TracChangeset for help on using the changeset viewer.