Changeset 1693 for cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter
- Timestamp:
- May 8, 2015, 7:52:55 AM (10 years ago)
- Location:
- cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fDiagnoses.pas
r829 r1693 25 25 private 26 26 procedure EnsurePrimaryDiag; 27 27 function isProblem(diagnosis: TPCEDiag): Boolean; 28 function isEncounterDx(problem: string): Boolean; 28 29 protected 29 30 procedure UpdateNewItemStr(var x: string); override; … … 38 39 'via the Problems tab.'; 39 40 TC_INACTIVE_CODE = 'Problem Contains Inactive Code'; 41 TX_REDUNDANT_DX = 'The problem that you''ve selected is already included in the list of diagnoses' + #13#10 + 42 'for this encounter. No need to select it again...'; 43 TC_REDUNDANT_DX = 'Redundant Diagnosis: '; 40 44 41 45 var … … 65 69 if not Primary and (Items.Count > 0) then 66 70 begin 67 GridIndex := 0;68 TPCEDiag(Items.Objects[ 0]).Primary := True;71 GridIndex := Items.Count - 1;//0; vhaispbellc CQ 15836 72 TPCEDiag(Items.Objects[Items.Count - 1]).Primary := True; 69 73 GridChanged; 70 74 end; … … 101 105 if(lbGrid.Selected[i]) then 102 106 TPCEDiag(lbGrid.Items.Objects[i]).AddProb := (ckbDiagProb.Checked) and 107 (not isProblem(TPCEDiag(lbGrid.Items.Objects[i]))) and 103 108 (TPCEDiag(lbGrid.Items.Objects[i]).Category <> PL_ITEMS); 104 109 GridChanged; … … 130 135 else 131 136 x := x + U + '0'; 137 end; 138 139 function TfrmDiagnoses.isProblem(diagnosis: TPCEDiag): Boolean; 140 var 141 i: integer; 142 p, code, narr, sct: String; 143 begin 144 result := false; 145 for i := 0 to FProblems.Count - 1 do 146 begin 147 p := FProblems[i]; 148 code := piece(p, '^', 1); 149 narr := piece(p, '^', 2); 150 if (pos('SCT', narr) > 0) or (pos('SNOMED', narr) > 0) then 151 sct := piece(piece(piece(narr, ')', 1), '(', 2), ' ', 2) 152 else 153 sct := ''; 154 narr := TrimRight(piece(narr, '(',1)); 155 if pos(diagnosis.Code, code) > 0 then 156 begin 157 result := true; 158 break; 159 end 160 else if (sct <> '') and (pos(sct, diagnosis.Narrative) > 0) then 161 begin 162 result := true; 163 break; 164 end 165 else if pos(narr, diagnosis.Narrative) > 0 then 166 begin 167 result := true; 168 break; 169 end; 170 end; 171 end; 172 173 function TfrmDiagnoses.isEncounterDx(problem: string): Boolean; 174 var 175 i: integer; 176 dx, code, narr, pCode, pNarrative, sct: String; 177 178 function getSCT(narr: string): string; 179 begin 180 if (pos('SNOMED CT ', narr) > 0) then 181 result := copy(narr, pos('SNOMED CT ', narr) + 10, length(narr)) 182 else 183 result := ''; 184 end; 185 186 begin 187 result := false; 188 pCode := piece(problem, U, 1); 189 pNarrative := piece(problem, U, 2); 190 for i := 0 to lbGrid.Items.Count - 1 do 191 begin 192 dx := lbGrid.Items[i]; 193 narr := piece(dx, U, 3); 194 code := piece(piece(copy(narr, pos('ICD-9-CM', narr), length(narr)), ' ', 2), ')', 1); 195 sct := getSCT(piece(narr, ':', 1)); 196 if pos(pCode, narr) > 0 then 197 begin 198 result := true; 199 break; 200 end 201 else if (sct <> '') and (pos(sct, pNarrative) > 0) then 202 begin 203 result := true; 204 break; 205 end 206 else if pos(narr, pNarrative) > 0 then 207 begin 208 result := true; 209 break; 210 end; 211 end; 132 212 end; 133 213 … … 149 229 if OK then 150 230 for k := 0 to lbGrid.Items.Count - 1 do 151 if (lbGrid.Selected[k]) and (TPCEDiag(lbGrid.Items.Objects[k]).Category = PL_ITEMS) then 152 PLItemCount := PLItemCount + 1; 231 begin 232 if (lbGrid.Selected[k]) then 233 begin 234 if (TPCEDiag(lbGrid.Items.Objects[k]).Category = PL_ITEMS) or isProblem(TPCEDiag(lbGrid.Items.Objects[k])) then 235 PLItemCount := PLItemCount + 1; 236 end; 237 end; 153 238 OK := OK and (PLItemCount < lbGrid.SelCount); 154 239 ckbDiagProb.Enabled := OK; … … 180 265 begin 181 266 inherited; 182 if lbxSection.width = 0 then Exit; 183 FSectionTabs[0] := -(lbxSection.width - LBCheckWidthSpace - (8*MainFontWidth) - ScrollBarWidth); 267 FSectionTabs[0] := -(lbxSection.width - LBCheckWidthSpace - (10 * MainFontWidth) - ScrollBarWidth); 184 268 FSectionTabs[1] := -FSectionTabs[0]+2; 185 269 FSectionTabs[2] := -FSectionTabs[0]+4; … … 190 274 Index: Integer); 191 275 begin 192 if not FUpdatingGrid then 193 if (lbxSection.Checked[Index]) and (Piece(lbxSection.Items[Index], U, 5) = '#') then 194 begin 195 InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK); 196 lbxSection.Checked[Index] := False; 197 exit; 198 end; 276 if (not FUpdatingGrid) and (lbxSection.Checked[Index]) then 277 begin 278 if (Piece(lbxSection.Items[Index], U, 5) = '#') then 279 begin 280 InfoBox(TX_INACTIVE_CODE, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK); 281 lbxSection.Checked[Index] := False; 282 exit; 283 end 284 else if isEncounterDx(lbxSection.Items[Index]) then 285 begin 286 InfoBox(TX_REDUNDANT_DX, TC_REDUNDANT_DX + piece(lbxSection.Items[Index], '^',2), 287 MB_ICONWARNING or MB_OK); 288 lbxSection.Checked[Index] := False; 289 exit; 290 end; 291 end; 199 292 inherited; 200 293 EnsurePrimaryDiag; … … 220 313 ADiagnosis: TPCEItem; 221 314 begin 222 315 inherited; 223 316 UBAGlobals.BAPCEDiagList.Clear; 224 317 with lbGrid do for i := 0 to Items.Count - 1 do -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fEncVitals.pas
r829 r1693 403 403 404 404 {== Vitals Lite 2004-05-21 ===================================================} 405 if VitalsDLLHandle <> 0 then 406 begin 407 FreeLibrary(VitalsDLLHandle); 408 VitalsDLLHandle := 0; 409 end; 405 UnloadVitalsDLL; 410 406 {== Vitals Lite 2004-05-21 ===================================================} 411 407 inherited; … … 429 425 430 426 procedure TfrmEncVitals.FormShow(Sender: TObject); 431 var432 GMV_LibName: String;433 427 begin 434 428 inherited; 435 429 //Begin Vitals Lite 436 430 {Visit is Assumed to Be selected when Opening Encounter Dialog} 437 GMV_LibName :='GMV_VitalsViewEnter.dll'; 438 GMV_LibName := GetProgramFilesPath + SHARE_DIR + GMV_LibName; 439 if VitalsDLLHandle = 0 then 440 VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName)); 431 LoadVitalsDLL; 441 432 if VitalsDLLHandle = 0 then // No Handle found 442 MessageDLG('Can''t find library "'+GMV_LibName+'".',mtError,[mbok],0)433 MessageDLG('Can''t find library '+VitalsDLLName+'.',mtError,[mbok],0) 443 434 else 444 435 LoadVitalsList; … … 619 610 if assigned(VLPtVitals) then 620 611 begin 621 // frmFrame.DLLActive := True; // need this flag for CCOW (RV)622 612 VitalsList := VLPtVitals(RPCBrokerV,Patient.DFN,U,false); 623 613 if assigned(VitalsList) then … … 627 617 MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0); 628 618 @VLPtVitals := nil; 629 // frmFrame.DLLActive := False; // need this flag for CCOW (RV)630 619 end; 631 620 //End Vitals Lite -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fEncounterFrame.dfm
r829 r1693 7 7 FormStyle = fsMDIForm 8 8 OldCreateOrder = True 9 Position = po ScreenCenter9 Position = poMainFormCenter 10 10 OnCanResize = FormCanResize 11 11 OnClose = FormClose -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fEncounterFrame.pas
r829 r1693 400 400 401 401 frmEncounterFrame.CreateChildForms(frmEncounterFrame, PCEData.Location); 402 SetFormPosition(frmEncounterFrame); 402 403 ResizeAnchoredFormToFont(frmEncounterFrame); 403 SetFormPosition(frmEncounterFrame);404 //SetFormPosition(frmEncounterFrame); 404 405 405 406 with frmEncounterFrame do -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEBase.dfm
r829 r1693 5 5 ClientHeight = 400 6 6 ClientWidth = 624 7 Position = poMainFormCenter 7 8 OnClose = FormClose 8 9 OnCreate = FormCreate -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEBaseGrid.dfm
r829 r1693 3 3 Top = 192 4 4 Caption = 'frmPCEBaseGrid' 5 ExplicitLeft = 1286 ExplicitTop = 1927 5 PixelsPerInch = 96 8 6 TextHeight = 13 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEBaseGrid.pas
r829 r1693 5 5 uses 6 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 fPCEBase, ComCtrls, StdCtrls, ORCtrls, ExtCtrls, Buttons, ORFn, 7 fPCEBase, ComCtrls, StdCtrls, ORCtrls, ExtCtrls, Buttons, ORFn, uPCE, 8 8 VA508AccessibilityManager; 9 9 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEBaseMain.dfm
r829 r1693 3 3 Top = 166 4 4 Caption = 'frmPCEBaseMain' 5 ExplicitWidth = 3206 ExplicitHeight = 2407 5 PixelsPerInch = 96 8 6 TextHeight = 13 … … 158 156 Pieces = '3' 159 157 CheckEntireLine = True 160 ExplicitLeft = -3161 ExplicitTop = -2162 158 end 163 159 object btnOther: TButton -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEBaseMain.pas
r829 r1693 60 60 FPCECode: string; 61 61 FSplitterMove: boolean; 62 FProblems: TStringList; 62 63 function GetCat: string; 63 64 procedure UpdateNewItemStr(var x: string); virtual; … … 86 87 87 88 uses fPCELex, fPCEOther, fEncounterFrame, fHFSearch, VA508AccessibilityRouter, 88 ORCtrlsVA508Compatibility, fBase508Form ;89 ORCtrlsVA508Compatibility, fBase508Form, UBAConst; 89 90 90 91 {$R *.DFM} … … 104 105 CheckOffEntries; 105 106 FSectionPopulated := TRUE; 107 if (lbSection.Items.Count > 0) then 108 lblList.Caption := StringReplace(lbSection.DisplayText[lbSection.ItemIndex], 109 '&', '&&', [rfReplaceAll] ); 110 if (lbSection.DisplayText[lbSection.ItemIndex] = DX_PROBLEM_LIST_TXT) then 111 FastAssign(lbxSection.Items, FProblems); 106 112 end; 107 113 … … 296 302 begin 297 303 inherited FormCreate(Sender); 304 FProblems := TStringList.Create; 298 305 lbxSection.HideSelection := TRUE; 299 306 amgrMain.ComponentManager[lbSection] := TLBSectionManager.Create; … … 301 308 302 309 procedure TfrmPCEBaseMain.FormDestroy(Sender: TObject); 303 var 304 i:integer; 305 306 begin 307 inherited; 308 with lbGrid.Items do for i := 0 to Count - 1 do TPCEItem(Objects[i]).Free; 310 begin 311 inherited; 312 FProblems.Free; 309 313 end; 310 314 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCEEdit.pas
r829 r1693 50 50 begin 51 51 Result := FALSE; 52 (* agp moved from FormCreate to addrss a problem with editing an encounter without a note displaying in CPRS*) 53 if uPatient <> Patient.DFN then 54 begin 55 KillObj(@uPCETemp); 56 KillObj(@uPCETempOld); 57 end; 58 uPatient := Patient.DFN; 52 59 if (Encounter.VisitCategory = 'H') then 53 60 begin … … 130 137 procedure TfrmPCEEdit.FormCreate(Sender: TObject); 131 138 begin 139 (* agp moved to EditPCEData procedure to addrss a problem 140 with editing an encounter without a note displaying in CPRS 132 141 if uPatient <> Patient.DFN then 133 142 begin … … 135 144 KillObj(@uPCETempOld); 136 145 end; 137 uPatient := Patient.DFN; 146 uPatient := Patient.DFN; *) 138 147 end; 139 148 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fPCELex.dfm
r829 r1693 7 7 ClientHeight = 275 8 8 ClientWidth = 429 9 Position = po ScreenCenter9 Position = poOwnerFormCenter 10 10 OnCreate = FormCreate 11 ExplicitWidth = 320 12 ExplicitHeight = 240 11 ExplicitHeight = 307 13 12 PixelsPerInch = 96 14 13 TextHeight = 13 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fProcedure.dfm
r829 r1693 4 4 Caption = 'Encounter Procedure' 5 5 ExplicitWidth = 632 6 ExplicitHeight = 4 276 ExplicitHeight = 434 7 7 PixelsPerInch = 96 8 8 TextHeight = 13 … … 93 93 end 94 94 object spnProcQty: TUpDown [11] 95 Left = 3 4895 Left = 353 96 96 Top = 371 97 97 Width = 15 … … 99 99 Associate = txtProcQty 100 100 Min = 1 101 Max = 999 101 102 Position = 1 102 103 TabOrder = 5 -
cprs/branches/HealthSevak-CPRS/CPRS-Chart/Encounter/fVisitType.dfm
r829 r1693 7 7 Constraints.MinWidth = 600 8 8 OnCloseQuery = FormCloseQuery 9 ExplicitLeft = 26010 9 ExplicitWidth = 600 11 ExplicitHeight = 4 7210 ExplicitHeight = 465 12 11 PixelsPerInch = 96 13 12 TextHeight = 13 … … 193 192 Align = alRight 194 193 TabOrder = 1 195 ExplicitLeft = 384194 ExplicitLeft = 422 196 195 ExplicitWidth = 208 197 196 ExplicitHeight = 164 … … 256 255 OnEnter = memSCDisplayEnter 257 256 Caption = 'Service Connection && Rated Disabilities' 257 ExplicitWidth = 422 258 258 end 259 259 end
Note:
See TracChangeset
for help on using the changeset viewer.