Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/uReminders.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/uReminders.pas
r459 r460 20 20 FNoResolve: boolean; 21 21 FWHReviewIEN: string; // AGP CHANGE 23.13 Allow for multiple processing of WH Review of Result Reminders 22 FRemWipe: integer; 22 23 protected 23 24 function GetIEN: string; virtual; … … 48 49 property DlgData: string read FDlgData; //AGP Change 24.8 49 50 property WHReviewIEN: string read FWHReviewIEN write FWHReviewIEN; //AGP CHANGE 23.13 51 property RemWipe: integer read FRemWipe write FRemWipe; 50 52 end; 51 53 … … 99 101 FMSTPrompt: TRemPrompt; 100 102 FWHPrintDevice, FWHResultChk, FWHResultNot: String; 101 //FRemWHNotPurpose: TStrings;103 FVitalDateTime: TFMDateTime; //AGP Changes 26.1 102 104 protected 103 105 procedure Check4ChildrenSharedPrompts; … … 156 158 property WHResultChk: String read FWHResultChk write FWHResultChk; 157 159 property WHResultNot: String read FWHResultNot write FWHResultNot; 158 //property RemWHNotPurpose: TStrings read FRemWHNotPurpose write FRemWHNotPurpose;160 property VitalDateTime: TFMDateTime read FVitalDateTime write FVitalDateTime; 159 161 end; 160 162 … … 170 172 FPCERoot: TRemPCERoot; 171 173 FParent: TRemDlgElement; 172 FRec3: string; 174 FRec3: string; 173 175 FActiveDates: TStringList; //Active dates for finding items. (rectype 3) 174 176 // FRoot: string; … … 219 221 FMonthReq: boolean; 220 222 FPrintNow: String; 223 FMHTestComplete: integer; 221 224 protected 222 225 function RemDataActive(RData: TRemData; EncDt: TFMDateTime):Boolean; … … 292 295 NotPurposeValue: string; 293 296 WHRemPrint: string; 297 InitialRemindersLoaded: boolean = FALSE; 294 298 295 299 const … … 298 302 RemPriorityText: array[1..3] of string = ('High','','Low'); 299 303 ClinMaintText = 'Clinical Maintenance'; 300 InitialRemindersLoaded: boolean = FALSE;301 304 302 305 dtUnknown = TRemDataType(-1); … … 432 435 433 436 uses rCore, uCore, rReminders, fRptBox, uConst, fReminderDialog, fNotes, rMisc, 434 fMHTest, rPCE, rTemplates, dShared, uTemplateFields, fIconLegend, fReminderTree ;437 fMHTest, rPCE, rTemplates, dShared, uTemplateFields, fIconLegend, fReminderTree, uInit; 435 438 436 439 type … … 896 899 begin 897 900 Sts := Piece(Data, U, 6); 898 if(Sts = '0') or (Sts = '1') then 901 //if(Sts = '0') or (Sts = '1') then 902 if(Sts = '0') or (Sts = '1') or (Sts = '3') or (Sts = '4') then //AGP Error change 26.8 899 903 begin 900 904 Result := TRUE; … … 1086 1090 begin 1087 1091 Tmp := Piece(Data, U, 6); 1088 if(Tmp = '1') then iidx := 2 1092 //if(Tmp = '1') then iidx := 2 1093 if (Tmp = '3') or (Tmp = '4') or (Tmp = '1') then iidx :=2 //AGP ERROR CHANGE 26.8 1089 1094 else if(Tmp = '0') then iidx := 3 1090 1095 else … … 1334 1339 if(NewStatus = '1') then Msg := 'Due' 1335 1340 else if(NewStatus = '0') then Msg := 'Applicable' 1341 else if(NewStatus = '3') then Msg := 'Error' //AGP Error code change 26.8 1342 else if (NewStatus = '4') then Msg := 'CNBD' //AGP Error code change 26.8 1336 1343 else Msg := 'Not Applicable'; 1337 1344 Msg := RName + ' is ' + Msg + '.'; … … 1829 1836 Data := RemCode + EvaluatedReminders[i]; 1830 1837 Tmp := Piece(Data,U,6); 1831 if(Tmp = '1') then Add2Tree(rfDue, DueCatID) 1838 // if(Tmp = '1') then Add2Tree(rfDue, DueCatID) 1839 if(Tmp = '1') or (Tmp = '3') or (Tmp = '4') then Add2Tree(rfDue, DueCatID) //AGP Error code change 26.8 1832 1840 else if(Tmp = '0') then Add2Tree(rfApplicable, ApplCatID) 1833 1841 else Add2Tree(rfNotApplicable, NotApplCatID); … … 2390 2398 begin 2391 2399 TempSL := GetDlgSL; 2400 if Piece(TempSL[0],U,2)='1' then 2401 begin 2402 Self.RemWipe := 1; 2403 end; 2392 2404 idx := -1; 2393 2405 repeat … … 2919 2931 2920 2932 begin 2921 Tmp := Piece(FRec1, U, 4);2922 if(Tmp = 'D') then Result := etDisplayOnly2923 else if(Tmp = 'T') then Result := etTaxonomy2924 else Result := etCheckBox;2933 Tmp := Piece(FRec1, U, 4); 2934 if(Tmp = 'D') then Result := etDisplayOnly 2935 else if(Tmp = 'T') then Result := etTaxonomy 2936 else Result := etCheckBox; 2925 2937 end; 2926 2938 … … 3013 3025 dt := Code2DataType(piece(TempSL[idx], U, r3Type)); 3014 3026 if(dt <> dtUnknown) and ((dt <> dtOrder) or 3015 (CharAt(piece(TempSL[idx], U, 11),1) in ['D', 'Q', 'M', 'O' ])) and3027 (CharAt(piece(TempSL[idx], U, 11),1) in ['D', 'Q', 'M', 'O', 'A'])) and //AGP change 26.10 for allergy orders 3016 3028 ((dt <> dtMentalHealthTest) or MHTestsOK) then 3017 3029 begin … … 3542 3554 DoLbl := Prompt.Required; 3543 3555 case pt of 3544 ptComment, ptQuantity , ptSkinReading:3556 ptComment, ptQuantity: 3545 3557 begin 3546 3558 Ctrl.edt := TEdit.Create(AOwner); … … 3578 3590 ptVisitLocation, ptLevelUnderstanding, 3579 3591 ptSeries, ptReaction, ptExamResults, 3580 ptLevelSeverity, ptSkinResults :3592 ptLevelSeverity, ptSkinResults, ptSkinReading: 3581 3593 begin 3582 3594 Ctrl.cbo := TORComboBox.Create(AOwner); … … 3585 3597 Ctrl.cbo.Style := orcsDropDown; 3586 3598 Ctrl.cbo.Pieces := '2'; 3587 Ctrl.cbo.Tag := ComboPromptTags[pt]; 3588 PCELoadORCombo(Ctrl.cbo, MinX, MaxX); 3599 if pt = ptSkinReading then 3600 begin 3601 Ctrl.cbo.Pieces := '1'; 3602 Ctrl.cbo.Items.Add(''); 3603 for j := 0 to 50 do Ctrl.cbo.Items.Add(inttostr(j)); 3604 GetComboBoxMinMax(Ctrl.cbo,MinX, MaxX); 3605 end; 3606 if pt <> ptSkinReading then 3607 begin 3608 Ctrl.cbo.Tag := ComboPromptTags[pt]; 3609 PCELoadORCombo(Ctrl.cbo, MinX, MaxX); 3610 end; 3589 3611 if pt = ptVisitLocation then 3590 3612 begin … … 4184 4206 end; 4185 4207 end; 4186 4208 4187 4209 begin 4188 4210 Result := nil; … … 4398 4420 end; 4399 4421 4400 { TODO -oLori -cNext : TRemDlgElement.AddText }4401 4422 procedure TRemDlgElement.AddText(Lst: TStrings); 4402 4423 var … … 4655 4676 (not Prompt.Forced) then 4656 4677 begin 4657 if (Pt = ptMHTest) and ( (Prompt.FValue = '') or (pos('X',Prompt.FValue)>0)) then4678 if (Pt = ptMHTest) and (Prompt.FMHTestComplete = 2) then 4658 4679 begin 4659 if Prompt.FValue = '' then 4660 WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6); 4661 if pos('X',Prompt.FValue)>0 then 4662 WordWrap('You are missing one or more responses in the MH test '+ 4663 Piece(Prompt.FData.FRec3,U,8),List,65,6); 4664 WordWrap(' ',List,65,6); 4680 if ((Prompt.FValue = '') or (pos('X',Prompt.FValue)>0)) then 4681 begin 4682 if Prompt.FValue = '' then 4683 WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6); 4684 if pos('X',Prompt.FValue)>0 then 4685 WordWrap('You are missing one or more responses in the MH test '+ 4686 Piece(Prompt.FData.FRec3,U,8),List,65,6); 4687 WordWrap(' ',List,65,6); 4688 end; 4665 4689 end; 4690 if (Pt = ptMHTest) and (Prompt.FMHTestComplete = 0) or (Prompt.FValue = '') then 4691 begin 4692 if Prompt.FValue = '' then 4693 WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6); 4694 if pos('X',Prompt.FValue)>0 then 4695 WordWrap('You are missing one or more responses in the MH test '+ 4696 Piece(Prompt.FData.FRec3,U,8),List,65,6); 4697 WordWrap(' ',List,65,6); 4698 end; 4666 4699 if (Pt = ptGAF) and ((Prompt.FValue = '0') or (Prompt.FValue = '')) then 4667 4700 begin … … 4952 4985 unt := Prompt.VitalUnitValue; 4953 4986 ConvertVital(v, rte, unt); 4954 txt := U + VitalCodes[v] + U + rte + U + FloatToStr(RemForm.PCEObj.VisitDateTime); 4987 //txt := U + VitalCodes[v] + U + rte + U + FloatToStr(RemForm.PCEObj.VisitDateTime); AGP Change 26.1 commented out 4988 txt := U + VitalCodes[v] + U + rte + U + '0'; //AGP Change 26.1 Use for Vital date/time 4955 4989 if(not Finishing) then 4956 4990 txt := Char(ord('A')+ord(v)) + FormatVitalForNote(txt); // Add vital sort char … … 5309 5343 NeedRedraw := FALSE; 5310 5344 case pt of 5311 ptComment, ptQuantity , ptSkinReading:5345 ptComment, ptQuantity: 5312 5346 TmpValue := (Sender as TEdit).Text; 5313 5347 … … 5480 5514 end; 5481 5515 end; 5482 5516 5483 5517 ptExamResults, ptSkinResults, ptLevelSeverity, 5484 ptSeries, ptReaction, ptLevelUnderstanding :5518 ptSeries, ptReaction, ptLevelUnderstanding, ptSkinReading: //(AGP Change 26.1) 5485 5519 TmpValue := (Sender as TORComboBox).ItemID; 5486 5520 else … … 5492 5526 idx := -1; 5493 5527 TmpValue := (Sender as TORComboBox).ItemID; 5528 if FParent.VitalDateTime = 0 then 5529 FParent.VitalDateTime := FMNow; 5494 5530 end; 5495 5531 else … … 5497 5533 end; 5498 5534 if(idx > 0) then 5499 SetPiece(TmpValue, ';', idx, TORExposedControl(Sender).Text); 5535 begin 5536 //AGP Change 26.1 change Vital time/date to Now instead of encounter date/time 5537 SetPiece(TmpValue, ';', idx, TORExposedControl(Sender).Text); 5538 if (FParent.VitalDateTime > 0) and (TORExposedControl(Sender).Text = '') then 5539 FParent.VitalDateTime := 0; 5540 if (FParent.VitalDateTime = 0) and (TORExposedControl(Sender).Text <> '') then 5541 FParent.VitalDateTime := FMNow; 5542 end; 5500 5543 end 5501 5544 else … … 5634 5677 Result := tmp; 5635 5678 5636 ptSkinReading: if(StrToIntDef(tmp,0) <> 0) then 5637 Result := tmp; 5679 (* ptSkinReading: if(StrToIntDef(tmp,0) <> 0) then 5680 Result := tmp; *) 5681 5682 ptSkinReading: // (AGP Change 26.1) 5683 begin 5684 Result := tmp; 5685 end; 5638 5686 5639 5687 ptVisitDate: … … 6151 6199 (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,1); 6152 6200 6153 ptSkinReading:6154 (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,0); 6201 (* ptSkinReading: 6202 (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,0); *) 6155 6203 6156 6204 ptVisitDate: … … 6191 6239 6192 6240 ptExamResults, ptSkinResults, ptLevelSeverity, 6193 ptSeries, ptReaction, ptLevelUnderstanding :6241 ptSeries, ptReaction, ptLevelUnderstanding, ptSkinReading: //(AGP Change 26.1) 6194 6242 (FCurrentControl as TORComboBox).SelectByID(GetValue); 6195 6243 … … 6426 6474 var 6427 6475 TmpSL: TStringList; 6428 i : integer;6476 i, TestComp: integer; 6429 6477 Before, After: string; 6430 6478 6431 6479 begin 6480 TestComp := 0; 6432 6481 if(MHTestAuthorized(FData.Narrative)) then 6433 6482 begin … … 6440 6489 Before := GetValue; 6441 6490 After := PerformMHTest(Before, FData.Narrative, TmpSL); 6442 if(Before <> After) then 6491 if uinit.TimedOut then After := ''; 6492 if pos(U,After)>0 then 6493 begin 6494 TestComp := StrtoInt(Piece(After,U,2)); 6495 self.FMHTestComplete := TestComp; 6496 After := Piece(After,U,1); 6497 end; 6498 if(Before <> After) and (not uInit.TimedOut) then 6443 6499 begin 6444 6500 if(After = '') or (FParent.ResultDlgID = 0) then 6445 6501 FMiscText := '' 6446 6502 else 6503 if TestComp > 0 then 6447 6504 begin 6448 6505 MentalHealthTestResults(FMiscText, FParent.ResultDlgID, FData.Narrative, … … 6464 6521 end; 6465 6522 finally 6466 FParent.FReminder.EndTextChanged(Sender); 6467 end; 6468 if(FParent.ElemType = etDisplayOnly) and (not assigned(FParent.FParent)) then 6469 RemindersInProcess.Notifier.Notify; 6470 end 6471 else 6472 InfoBox('Not Authorized to score the ' + FData.Narrative + ' test.', 6473 'Insufficient Authorization', MB_OK + MB_ICONERROR); 6523 if not uInit.TimedOut then 6524 FParent.FReminder.EndTextChanged(Sender); 6525 end; 6526 if not uInit.TimedOut then 6527 if(FParent.ElemType = etDisplayOnly) and (not assigned(FParent.FParent)) then 6528 RemindersInProcess.Notifier.Notify; 6529 end 6530 else 6531 InfoBox('Not Authorized to score the ' + FData.Narrative + ' test.', 6532 'Insufficient Authorization', MB_OK + MB_ICONERROR); 6474 6533 end; 6475 6534
Note:
See TracChangeset
for help on using the changeset viewer.