Changeset 829 for cprs/trunk/CPRS-Chart/Encounter/uPCE.pas
- Timestamp:
- Jul 7, 2010, 4:31:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Encounter/uPCE.pas
r456 r829 1 1 unit uPCE; 2 2 3 3 interface 4 4 … … 220 220 FHNCRelated: Integer; // 221 221 FCVRelated: Integer; // 222 FSHADRelated: Integer; // 222 223 FVisitType: TPCEProc; // 223 224 FProviders: TPCEProviderList; … … 248 249 procedure SetHNCRelated(Value: Integer); 249 250 procedure SetCVRelated(Value: Integer); 251 procedure SetSHADRelated(Value: Integer); 250 252 procedure SetEncUseCurr(Value: Boolean); 251 253 function GetHasData: Boolean; … … 286 288 function StrExams: string; 287 289 function StrVisitType(const ASCRelated, AAORelated, AIRRelated, AECRelated, 288 AMSTRelated, AHNCRelated, ACVRelated : Integer): string; overload;290 AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string; overload; 289 291 function StrVisitType: string; overload; 290 292 function StandAlone: boolean; … … 311 313 property HNCRelated: Integer read FHNCRelated write SetHNCRelated; 312 314 property CVRelated: Integer read FCVRelated write SetCVRelated; 315 property SHADRelated: Integer read FSHADRelated write SetSHADRelated; 313 316 property VisitType: TPCEProc read FVisitType write SetVisitType; 314 317 property VisitString: string read GetVisitString; … … 596 599 begin 597 600 Result := PCESetsOfCodes.Add(Hdr); 598 PCESetsOfCodes.AddStrings(TempSL);601 FastAddStrings(TempSL, PCESetsOfCodes); 599 602 end; 600 603 finally … … 618 621 HistLocations.Insert(0,'0'); 619 622 end; 620 List.AddStrings(HistLocations);623 FastAddStrings(HistLocations, List); 621 624 end 622 625 else … … 754 757 begin 755 758 idx := PCESetsOfCodes.Add(Hdr); 756 PCESetsOfCodes.AddStrings(TempSL);759 FastAddStrings(TempSL, PCESetsOfCodes); 757 760 end; 758 761 finally … … 1639 1642 FHNCRelated := SCC_NA; 1640 1643 FCVRelated := SCC_NA; 1644 FSHADRelated := SCC_NA; 1641 1645 FSCChanged := False; 1642 1646 end; … … 1695 1699 FHNCRelated := SCC_NA; 1696 1700 FCVRelated := SCC_NA; 1701 FSHADRelated := SCC_NA; 1697 1702 1698 1703 ClearList(FDiagnoses); … … 2075 2080 if(FileCat = 'E') and (FHistoricalLocation <> '') then 2076 2081 Add('VST^OL^' + FHistoricalLocation); // Outside Location 2077 2078 //Add('PRV^' + IntToStr(FEncProvider)); // Encounter Provider 2079 //Add('PRV^' + IntToStr(UProvider.IEN)); // Encounter Provider 2080 {with FProviders do for i := 0 to Count - 1 do with TPCEProvider(Items[i]) do 2081 begin 2082 PCEList.Add(DelimitedStr); 2083 end;} 2084 PCEList.AddStrings(FProviders); 2085 2082 FastAddStrings(FProviders, PCEList); 2083 2086 2084 if FSCChanged then 2087 2085 begin 2088 if FSCRelated <> SCC_NA then Add('VST^SC^' + IntToStr(FSCRelated));2089 if FAORelated <> SCC_NA then Add('VST^AO^' + IntToStr(FAORelated));2090 if FIRRelated <> SCC_NA then Add('VST^IR^' + IntToStr(FIRRelated));2091 if FECRelated <> SCC_NA then Add('VST^EC^' + IntToStr(FECRelated));2092 if FMSTRelated <> SCC_NA then Add('VST^MST^' + IntToStr(FMSTRelated));2093 // if HNCOK and (FHNCRelated <> SCC_NA) then 2094 if F HNCRelated <> SCC_NA then Add('VST^HNC^' + IntToStr(FHNCRelated));2095 if F CVRelated <> SCC_NA then Add('VST^CV^' + IntToStr(FCVRelated));2086 if FSCRelated <> SCC_NA then Add('VST^SC^' + IntToStr(FSCRelated)); 2087 if FAORelated <> SCC_NA then Add('VST^AO^' + IntToStr(FAORelated)); 2088 if FIRRelated <> SCC_NA then Add('VST^IR^' + IntToStr(FIRRelated)); 2089 if FECRelated <> SCC_NA then Add('VST^EC^' + IntToStr(FECRelated)); 2090 if FMSTRelated <> SCC_NA then Add('VST^MST^' + IntToStr(FMSTRelated)); 2091 if FHNCRelated <> SCC_NA then Add('VST^HNC^'+ IntToStr(FHNCRelated)); 2092 if FCVRelated <> SCC_NA then Add('VST^CV^' + IntToStr(FCVRelated)); 2093 if FSHADRelated <> SCC_NA then Add('VST^SHD^'+ IntToStr(FSHADRelated)); 2096 2094 end; 2097 2095 with FDiagnoses do for i := 0 to Count - 1 do with TPCEDiag(Items[i]) do … … 2266 2264 begin 2267 2265 Result := -1; 2268 // with AList do for i := 0 to Count - 1 do with TPCEItem(Items[i]) do if Match(AnItem) and MatchProvider(AnItem)then2269 2266 with AList do for i := 0 to Count - 1 do with TPCEItem(Items[i]) do if Match(AnItem) and MatchProvider(AnItem)then 2270 // with AList do for i := 0 to Count - 1 do with TPCEItem(Items[i]) do if Match(AnItem) then2271 2267 begin 2272 2268 Result := i; … … 2289 2285 begin 2290 2286 PostItem := TPCEItem(Objects[j]); 2291 // if (PreItem.Match(PostItem) and (PreItem.MatchProvider(PostItem))) then MatchFound := True;2292 2287 if (PreItem.Match(PostItem) and (PreItem.MatchProvider(PostItem))) then MatchFound := True; 2293 // if (PreItem.Match(PostItem)) then MatchFound := True;2294 2288 end; 2295 2289 if not MatchFound then … … 2423 2417 if CurImmunization.Reaction = '' then CurImmunization.Reaction := NoPCEValue; 2424 2418 2425 // if (SrcImmunization.Provider <> CurImmunization.Provider) or2426 2419 if(SrcImmunization.Series <> CurImmunization.Series) or 2427 2420 (SrcImmunization.Reaction <> CurImmunization.Reaction) or … … 2430 2423 (CurImmunization.Comment <> SrcImmunization.Comment)then 2431 2424 begin 2432 // CurImmunization.Provider := SrcImmunization.Provider;2433 2425 CurImmunization.Series := SrcImmunization.Series; 2434 2426 CurImmunization.Reaction := SrcImmunization.Reaction; … … 2465 2457 if CurSkinTest.Results = '' then CurSkinTest.Results := NoPCEValue; 2466 2458 if SrcSkinTest.Results = '' then SrcSkinTest.Results := NoPCEValue; 2467 // if (SrcSkinTest.Provider <> CurSkinTest.Provider) or 2459 2468 2460 if(SrcSkinTest.Results <> CurSkinTest.Results) or 2469 2461 (SrcSkinTest.Reading <> CurSkinTest.Reading) or 2470 (CurSkinTest.Comment <> SrcSkinTest.Comment) then 2471 begin 2472 // CurSkinTest.Provider := SrcSkinTest.Provider; 2462 (CurSkinTest.Comment <> SrcSkinTest.Comment) then 2463 begin 2464 2473 2465 CurSkinTest.Results := SrcSkinTest.Results; 2474 2466 CurSkinTest.Reading := SrcSkinTest.Reading; 2475 CurSkinTest.Comment := SrcSkinTest.Comment; 2467 CurSkinTest.Comment := SrcSkinTest.Comment; 2476 2468 CurSkinTest.FSend := True; 2477 2469 end; … … 2502 2494 if CurPatientEd.level = '' then CurPatientEd.level := NoPCEValue; 2503 2495 if SrcPatientEd.level = '' then SrcPatientEd.level := NoPCEValue; 2504 // if (SrcPatientEd.Provider <> CurPatientEd.Provider) or2505 2496 if(SrcPatientEd.Level <> CurPatientEd.Level) or 2506 2497 (CurPatientEd.Comment <> SrcPatientEd.Comment) then 2507 2498 begin 2508 // CurPatientEd.Provider := SrcPatientEd.Provider;2509 2499 CurPatientEd.Level := SrcPatientEd.Level; 2510 2500 CurPatientEd.Comment := SrcPatientEd.Comment; … … 2539 2529 if CurHealthFactor.level = '' then CurHealthFactor.level := NoPCEValue; 2540 2530 if SrcHealthFactor.level = '' then SrcHealthFactor.level := NoPCEValue; 2541 // if (SrcHealthFactor.Provider <> CurHealthFactor.Provider) or2542 2531 if(SrcHealthFactor.Level <> CurHealthFactor.Level) or 2543 2532 (CurHealthFactor.Comment <> SrcHealthFactor.Comment) then 2544 2533 begin 2545 // CurHealthFactor.Provider := SrcHealthFactor.Provider;2546 2534 CurHealthFactor.Level := SrcHealthFactor.Level; 2547 2535 CurHealthFactor.Comment := SrcHealthFactor.Comment; … … 2578 2566 if CurExam.Results = '' then CurExam.Results := NoPCEValue; 2579 2567 if SrcExam.Results = '' then SrcExam.Results := NoPCEValue; 2580 // if (SrcExam.Provider <> CurExam.Provider) or2581 2568 if(SrcExam.Results <> CurExam.Results) or 2582 2569 (CurExam.Comment <> SrcExam.Comment) then 2583 2570 begin 2584 // CurExam.Provider := SrcExam.Provider;2585 2571 CurExam.Results := SrcExam.Results; 2586 2572 CurExam.Comment := SrcExam.Comment; … … 2683 2669 end; 2684 2670 2671 procedure TPCEData.SetSHADRelated(Value: Integer); 2672 begin 2673 if (Value <> FSHADRelated) then 2674 begin 2675 FSHADRelated := Value; 2676 FSCChanged := True; 2677 end; 2678 end; 2679 2685 2680 procedure TPCEData.SetEncUseCurr(Value: Boolean); 2686 2681 begin … … 2694 2689 FStandAlone := Encounter.StandAlone; 2695 2690 FStandAloneLoaded := TRUE; 2696 //FCPTRequired := Encounter.StandAlone;2697 2691 FEncInpatient := Encounter.Inpatient; 2698 //if FEncInpatient then FCPTRequired := False; 2699 //SetDefaultProvider(FProviders, FEncLocation, FNoteIEN, PersonClassDate); 2692 2700 2693 end else 2701 2694 begin … … 2706 2699 FProviders.PrimaryIdx := -1; 2707 2700 FEncSvcCat := 'A'; 2708 //FCPTRequired := False;2709 2701 FEncInpatient := False; 2710 2702 end; 2711 2703 // 2712 2704 SetRPCEncLocation(FEncLocation); 2713 // SetRPCEncDateTime(FEncDateTime);2714 2705 end; 2715 2706 … … 2798 2789 2799 2790 function TPCEData.StrVisitType(const ASCRelated, AAORelated, AIRRelated, 2800 AECRelated, AMSTRelated, AHNCRelated, ACVRelated : Integer): string;2791 AECRelated, AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string; 2801 2792 { returns as a string the type of encounter (according to CPT) & related contitions treated } 2802 2793 … … 2832 2823 end; 2833 2824 Result := Trim(Result + StrVisitType(FSCRelated, FAORelated, FIRRelated, 2834 FECRelated, FMSTRelated, FHNCRelated, FCVRelated ));2825 FECRelated, FMSTRelated, FHNCRelated, FCVRelated, FSHADRelated)); 2835 2826 end; 2836 2827 … … 2901 2892 Dest.FHNCRelated := FHNCRelated; 2902 2893 Dest.FCVRelated := FCVRelated; 2894 Dest.FSHADRelated := FSHADRelated; 2903 2895 FVisitType.CopyProc(Dest.VisitType); 2904 2896 Dest.FProviders.Assign(FProviders); … … 2928 2920 if(not FutureEncounter(Self)) then 2929 2921 begin 2930 // if(PromptForWorkload(FNoteIEN, FNoteTitle, FEncSvcCat, StandAlone) or CPTRequiredForNote(FNoteIEN)) then2931 2922 if(PromptForWorkload(FNoteIEN, FNoteTitle, FEncSvcCat, StandAlone)) then 2932 2923 begin … … 2959 2950 // if HNCOK and (EC.HNCAllow and (HNCRelated = SCC_NA)) then NeedSC := TRUE; 2960 2951 if(EC.HNCAllow and (HNCRelated = SCC_NA)) then NeedSC := TRUE; 2961 if(EC.CVAllow and (CVRelated = SCC_NA) ) then NeedSC := TRUE;2952 if(EC.CVAllow and (CVRelated = SCC_NA) and (SHADRelated = SCC_NA)) then NeedSC := TRUE; 2962 2953 if(NeedSC) then 2963 2954 Include(Result, ndSC); … … 3274 3265 if(Result) then Result := (FHNCRelated = SCC_NA); 3275 3266 if(Result) then Result := (FCVRelated = SCC_NA); 3267 if(Result) then Result := (FSHADRelated = SCC_NA); 3276 3268 if(Result) then Result := (FDiagnoses.Count = 0); 3277 3269 if(Result) then Result := (FProcedures.Count = 0);
Note:
See TracChangeset
for help on using the changeset viewer.