Changeset 1679 for cprs/trunk/CPRS-Chart/uCore.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/uCore.pas
r830 r1679 7 7 interface 8 8 9 uses SysUtils, Windows, Classes, Forms, ORFn, rCore, uConst, ORClasses ;9 uses SysUtils, Windows, Classes, Forms, ORFn, rCore, uConst, ORClasses, uCombatVet; 10 10 11 11 type … … 86 86 FRestricted: Boolean; // True if this is a restricted record 87 87 FInpatient: Boolean; // True if that patient is an inpatient 88 FStatus: string; // Patient status indicator (Inpatient or Outpatient) 88 89 FLocation: Integer; // IEN in Hosp Loc if inpatient 89 90 FWardService: string; … … 95 96 FPrimProv: string; // name of primary care provider 96 97 FAttending: string; // if inpatient, name of attending 98 FAssociate: string; // if inpatient, name of associate 97 99 FDateDied: TFMDateTime; // Date of Patient Death (<=0 or still alive) 98 100 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 103 102 procedure SetDFN(const Value: string); 104 function GetDateDied: TFMDateTime; // *DFN* 103 function GetDateDied: TFMDateTime; 104 function GetCombatVet: TCombatVet; // *DFN* 105 105 public 106 106 procedure Clear; 107 destructor Destroy; override; 107 108 property DFN: string read FDFN write SetDFN; //*DFN* 108 109 property ICN: string read FICN; … … 114 115 property CWAD: string read FCWAD; 115 116 property Inpatient: Boolean read FInpatient; 117 property Status: string read FStatus; 116 118 property Location: Integer read FLocation; 117 119 property WardService: string read FWardService; … … 124 126 property PrimaryProvider: string read FPrimProv; 125 127 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; 130 130 end; 131 131 … … 183 183 FParentID : string; 184 184 FUser : Int64; 185 FOrderDG : String;185 FOrderDG : String; 186 186 FDCOrder : boolean; 187 187 FDelay : boolean; … … 218 218 destructor Destroy; override; 219 219 procedure Add(ItemType: Integer; const AnID, ItemText, GroupName: string; SignState: Integer; AParentID: string = ''; 220 User: int64 = 0; OrderDG: String = ''; DCOrder: boolean = FALSE; Delay: boolean = F ALSE);220 User: int64 = 0; OrderDG: String = ''; DCOrder: boolean = FALSE; Delay: boolean = False); 221 221 procedure Clear; 222 222 function CanSign: Boolean; … … 246 246 //AlertData: string; 247 247 RecordID: string; 248 HighLightSection: String; 248 249 end; 249 250 … … 257 258 function GetFollowUp: Integer; 258 259 function GetAlertData: string; 260 function GetHighLightSection: String; //CB 259 261 function GetRecordID: string; 260 262 function GetText: string; … … 262 264 constructor Create; 263 265 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 265 267 procedure Clear; 266 268 procedure Next; … … 274 276 property RecordID: string read GetRecordID; 275 277 property Text: string read GetText; 278 property HighLightSection: String read GetHighLightSection; //cb 276 279 end; 277 280 … … 727 730 FRestricted := False; 728 731 FInpatient := False; 732 FStatus := ''; 729 733 FLocation := 0; 730 734 FWardService := ''; … … 736 740 FPrimProv := ''; 737 741 FAttending := ''; 738 //vwpt hrn althrn 739 FHRN := ''; 740 FAltHRN := ''; 741 //end vwpt 742 FreeAndNil(FCombatVet); 743 end; 744 745 destructor TPatient.Destroy; 746 begin 747 FreeAndNil(FCombatVet); 748 inherited; 749 end; 750 751 function TPatient.GetCombatVet: TCombatVet; 752 begin 753 if FCombatVet = nil then 754 FCombatVet := TCombatVet.Create(FDFN); 755 Result := FCombatVet; 742 756 end; 743 757 … … 770 784 FRestricted := PtSelect.Restricted; 771 785 FInpatient := Length(PtSelect.Location) > 0; 786 if FInpatient then FStatus := ' (INPATIENT)' 787 else FStatus := ' (OUTPATIENT)'; 772 788 FWardService :=PtSelect.WardService; 773 789 FLocation := PtSelect.LocationIEN; … … 779 795 FPrimProv := PtSelect.PrimaryProvider; 780 796 FAttending := PtSelect.Attending; 781 //vwpt HRN ALTHRN 782 FHRN := PtSelect.HRN; 783 FAltHRN := PtSelect.AltHRN; 784 //end vwpt 797 FAssociate := PtSelect.Associate; 785 798 end; 786 799 … … 1287 1300 i, CanSign(*, OrderUser*): Integer; 1288 1301 OrderUser: int64; 1289 AnID : string;1302 AnID, Display: string; 1290 1303 HaveOrders, OtherOrders: TStringList; 1291 1304 AChangeItem: TChangeItem; 1305 IsDiscontinue, IsDelay: boolean; 1292 1306 begin 1293 1307 if Patient.DFN = '' then Exit; … … 1311 1325 if Piece(OtherOrders[i],U,2) = '' then OrderUser := 0 1312 1326 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); 1314 1334 end; 1315 1335 finally … … 1336 1356 end; 1337 1357 1338 procedure TNotifications.Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string ); //*DFN*1358 procedure TNotifications.Add(const ADFN: string; AFollowUp: Integer; const ARecordID: string; AHighLightSection : string = ''); //*DFN* 1339 1359 var 1340 1360 NotifyItem: TNotifyItem; … … 1344 1364 NotifyItem.FollowUp := AFollowUp; 1345 1365 NotifyItem.RecordID := ARecordId; 1366 If AHighLightSection <> '' then NotifyItem.HighLightSection := AHighLightSection; 1346 1367 FList.Add(NotifyItem); 1347 1368 FActive := True; … … 1387 1408 else Result := ''; 1388 1409 end; 1410 1411 function TNotifications.GetHighLightSection: String; //CB 1412 begin 1413 if FNotifyItem <> nil then Result := FNotifyItem.HighLightSection else Result := ''; 1414 end; 1415 1389 1416 1390 1417 procedure TNotifications.Next;
Note:
See TracChangeset
for help on using the changeset viewer.