Ignore:
Timestamp:
Jul 7, 2010, 4:31:10 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Upgrade to version 27

File:
1 edited

Legend:

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

    r456 r829  
    11unit uPCE;
    2 
     2                                                                       
    33interface
    44
     
    220220    FHNCRelated:   Integer;                        //
    221221    FCVRelated:    Integer;                        //
     222    FSHADRelated:   Integer;                        //
    222223    FVisitType:    TPCEProc;                       //
    223224    FProviders:    TPCEProviderList;
     
    248249    procedure SetHNCRelated(Value: Integer);
    249250    procedure SetCVRelated(Value: Integer);
     251    procedure SetSHADRelated(Value: Integer);
    250252    procedure SetEncUseCurr(Value: Boolean);
    251253    function GetHasData: Boolean;
     
    286288    function StrExams: string;
    287289    function StrVisitType(const ASCRelated, AAORelated, AIRRelated, AECRelated,
    288                                 AMSTRelated, AHNCRelated, ACVRelated: Integer): string; overload;
     290                                AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string; overload;
    289291    function StrVisitType: string; overload;
    290292    function StandAlone: boolean;
     
    311313    property HNCRelated:   Integer  read FHNCRelated  write SetHNCRelated;
    312314    property CVRelated:    Integer  read FCVRelated  write SetCVRelated;
     315    property SHADRelated:   Integer  read FSHADRelated write SetSHADRelated;
    313316    property VisitType:    TPCEProc read FVisitType   write SetVisitType;
    314317    property VisitString:  string   read GetVisitString;
     
    596599      begin
    597600        Result := PCESetsOfCodes.Add(Hdr);
    598         PCESetsOfCodes.AddStrings(TempSL);
     601        FastAddStrings(TempSL, PCESetsOfCodes);
    599602      end;
    600603    finally
     
    618621      HistLocations.Insert(0,'0');
    619622    end;
    620     List.AddStrings(HistLocations);
     623    FastAddStrings(HistLocations, List);
    621624  end
    622625  else
     
    754757        begin
    755758          idx := PCESetsOfCodes.Add(Hdr);
    756           PCESetsOfCodes.AddStrings(TempSL);
     759          FastAddStrings(TempSL, PCESetsOfCodes);
    757760        end;
    758761      finally
     
    16391642  FHNCRelated  := SCC_NA;
    16401643  FCVRelated   := SCC_NA;
     1644  FSHADRelated := SCC_NA;
    16411645  FSCChanged   := False;
    16421646end;
     
    16951699  FHNCRelated := SCC_NA;
    16961700  FCVRelated  := SCC_NA;
     1701  FSHADRelated := SCC_NA;
    16971702
    16981703  ClearList(FDiagnoses);
     
    20752080      if(FileCat = 'E') and (FHistoricalLocation <> '') then
    20762081        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
    20862084      if FSCChanged then
    20872085      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 FHNCRelated <> SCC_NA then Add('VST^HNC^' + IntToStr(FHNCRelated));
    2095         if FCVRelated <> 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));
    20962094      end;
    20972095     with FDiagnoses  do for i := 0 to Count - 1 do with TPCEDiag(Items[i]) do
     
    22662264begin
    22672265  Result := -1;
    2268 //  with AList do for i := 0 to Count - 1 do with TPCEItem(Items[i]) do if Match(AnItem) and MatchProvider(AnItem)then
    22692266  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) then
    22712267  begin
    22722268    Result := i;
     
    22892285    begin
    22902286      PostItem := TPCEItem(Objects[j]);
    2291 //      if (PreItem.Match(PostItem) and (PreItem.MatchProvider(PostItem))) then MatchFound := True;
    22922287      if (PreItem.Match(PostItem) and (PreItem.MatchProvider(PostItem))) then MatchFound := True;
    2293 //      if (PreItem.Match(PostItem)) then MatchFound := True;
    22942288    end;
    22952289    if not MatchFound then
     
    24232417      if CurImmunization.Reaction = '' then CurImmunization.Reaction := NoPCEValue;
    24242418
    2425 //      if (SrcImmunization.Provider <> CurImmunization.Provider) or
    24262419      if(SrcImmunization.Series <> CurImmunization.Series) or
    24272420        (SrcImmunization.Reaction <> CurImmunization.Reaction) or
     
    24302423        (CurImmunization.Comment <> SrcImmunization.Comment)then 
    24312424      begin
    2432 //        CurImmunization.Provider        := SrcImmunization.Provider;
    24332425        CurImmunization.Series          := SrcImmunization.Series;
    24342426        CurImmunization.Reaction        := SrcImmunization.Reaction;
     
    24652457      if CurSkinTest.Results = '' then CurSkinTest.Results := NoPCEValue;
    24662458      if SrcSkinTest.Results = '' then SrcSkinTest.Results := NoPCEValue;
    2467 //      if (SrcSkinTest.Provider <> CurSkinTest.Provider) or
     2459
    24682460      if(SrcSkinTest.Results <> CurSkinTest.Results) or
    24692461        (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
    24732465        CurSkinTest.Results := SrcSkinTest.Results;
    24742466        CurSkinTest.Reading := SrcSkinTest.Reading;
    2475         CurSkinTest.Comment := SrcSkinTest.Comment; 
     2467        CurSkinTest.Comment := SrcSkinTest.Comment;
    24762468        CurSkinTest.FSend := True;
    24772469      end;
     
    25022494      if CurPatientEd.level = '' then CurPatientEd.level := NoPCEValue;
    25032495      if SrcPatientEd.level = '' then SrcPatientEd.level := NoPCEValue;
    2504 //      if (SrcPatientEd.Provider <> CurPatientEd.Provider) or
    25052496      if(SrcPatientEd.Level <> CurPatientEd.Level) or
    25062497        (CurPatientEd.Comment <> SrcPatientEd.Comment) then
    25072498      begin
    2508 //        CurPatientEd.Provider := SrcPatientEd.Provider;
    25092499        CurPatientEd.Level  := SrcPatientEd.Level;
    25102500        CurPatientEd.Comment := SrcPatientEd.Comment; 
     
    25392529      if CurHealthFactor.level = '' then CurHealthFactor.level := NoPCEValue;
    25402530      if SrcHealthFactor.level = '' then SrcHealthFactor.level := NoPCEValue;
    2541 //      if (SrcHealthFactor.Provider <> CurHealthFactor.Provider) or
    25422531      if(SrcHealthFactor.Level <> CurHealthFactor.Level) or
    25432532        (CurHealthFactor.Comment <> SrcHealthFactor.Comment) then 
    25442533      begin
    2545 //        CurHealthFactor.Provider := SrcHealthFactor.Provider;
    25462534        CurHealthFactor.Level  := SrcHealthFactor.Level;
    25472535        CurHealthFactor.Comment := SrcHealthFactor.Comment; 
     
    25782566      if CurExam.Results = '' then CurExam.Results := NoPCEValue;
    25792567      if SrcExam.Results = '' then SrcExam.Results := NoPCEValue;
    2580 //      if (SrcExam.Provider <> CurExam.Provider) or
    25812568      if(SrcExam.Results <> CurExam.Results) or
    25822569        (CurExam.Comment <> SrcExam.Comment) then 
    25832570      begin
    2584 //        CurExam.Provider := SrcExam.Provider;
    25852571        CurExam.Results  := SrcExam.Results;
    25862572        CurExam.Comment := SrcExam.Comment; 
     
    26832669end;
    26842670
     2671procedure TPCEData.SetSHADRelated(Value: Integer);
     2672begin
     2673  if (Value <> FSHADRelated) then
     2674  begin
     2675    FSHADRelated := Value;
     2676    FSCChanged   := True;
     2677  end;
     2678end;
     2679
    26852680procedure TPCEData.SetEncUseCurr(Value: Boolean);
    26862681begin
     
    26942689    FStandAlone   := Encounter.StandAlone;
    26952690    FStandAloneLoaded := TRUE;
    2696     //FCPTRequired  := Encounter.StandAlone; 
    26972691    FEncInpatient := Encounter.Inpatient;
    2698     //if FEncInpatient then FCPTRequired := False;   
    2699     //SetDefaultProvider(FProviders, FEncLocation, FNoteIEN, PersonClassDate);
     2692
    27002693  end else
    27012694  begin
     
    27062699    FProviders.PrimaryIdx := -1;
    27072700    FEncSvcCat    := 'A';
    2708     //FCPTRequired  := False;   
    27092701    FEncInpatient := False;
    27102702  end;
    27112703  //
    27122704  SetRPCEncLocation(FEncLocation);
    2713 //  SetRPCEncDateTime(FEncDateTime);
    27142705end;
    27152706
     
    27982789
    27992790function TPCEData.StrVisitType(const ASCRelated, AAORelated, AIRRelated,
    2800   AECRelated, AMSTRelated, AHNCRelated, ACVRelated: Integer): string;
     2791  AECRelated, AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string;
    28012792{ returns as a string the type of encounter (according to CPT) & related contitions treated }
    28022793
     
    28322823    end;
    28332824  Result := Trim(Result + StrVisitType(FSCRelated, FAORelated, FIRRelated,
    2834                                        FECRelated, FMSTRelated, FHNCRelated, FCVRelated));
     2825                                       FECRelated, FMSTRelated, FHNCRelated, FCVRelated, FSHADRelated));
    28352826end;
    28362827
     
    29012892  Dest.FHNCRelated   := FHNCRelated;
    29022893  Dest.FCVRelated    := FCVRelated;
     2894  Dest.FSHADRelated  := FSHADRelated;
    29032895  FVisitType.CopyProc(Dest.VisitType);
    29042896  Dest.FProviders.Assign(FProviders);
     
    29282920  if(not FutureEncounter(Self)) then
    29292921  begin
    2930 //    if(PromptForWorkload(FNoteIEN, FNoteTitle, FEncSvcCat, StandAlone) or CPTRequiredForNote(FNoteIEN)) then
    29312922    if(PromptForWorkload(FNoteIEN, FNoteTitle, FEncSvcCat, StandAlone)) then
    29322923    begin
     
    29592950//        if HNCOK and (EC.HNCAllow and (HNCRelated = SCC_NA)) then NeedSC := TRUE;
    29602951        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;
    29622953        if(NeedSC) then
    29632954          Include(Result, ndSC);
     
    32743265  if(Result) then Result := (FHNCRelated = SCC_NA);
    32753266  if(Result) then Result := (FCVRelated = SCC_NA);
     3267  if(Result) then Result := (FSHADRelated = SCC_NA);
    32763268  if(Result) then Result := (FDiagnoses.Count = 0);
    32773269  if(Result) then Result := (FProcedures.Count = 0);
Note: See TracChangeset for help on using the changeset viewer.