anchor.diff:  end;
   
   function TLoincServices.ChildCount(context: TCodeSystemProviderContext): integer;
  -begin
  +var
  +  ctxt : TLoincProviderContext;
  +begin
  +  ctxt := context as TLoincProviderContext;
     // no children in loinc
  +
     if context = nil then
       result := TotalCount
  +  else if ctxt.kind = lpckPart then
  +    result := 0
     else
       result := 0;
   end;
   
   procedure TLOINCServices.Close(ctxt: TCodeSystemProviderContext);
   begin
  -  // nothing, because it's actually a pointer to an integer
  +  ctxt.Free;
   end;
   
   function TLoincServices.getcontext(context: TCodeSystemProviderContext; ndx: integer): TCodeSystemProviderContext;
  
positive.code: 
  function TLoincServices.Code(context: TCodeSystemProviderContext): string;
  var
    index : cardinal;
    iDescription, iStems, iOtherNames : Cardinal;
    iEntry, iCode, iOther, iConcepts, iStem, iParent, iChildren, iDescendents, iDescendantConcepts : Cardinal;
    iComponent, iProperty, iTimeAspect, iSystem, iScale, iMethod, iClass : Cardinal;
    iFlags : Byte;
    lang : byte;
  begin
    index := cardinal(context)-1;
    if index < CodeList.Count then
      CodeList.GetInformation(index, nil, result, iDescription, iOtherNames, iStems, iEntry, iComponent, iProperty, iTimeAspect, iSystem, iScale, iMethod, iClass, iFlags)
    else if index < CodeList.Count + AnswerLists.Count then
    begin
      FAnswerLists.GetEntry(index - CodeList.Count, iCode, iDescription, iOther);
      result := Desc.GetEntry(iCode, lang);
    end
    else
    begin
      FEntries.GetEntry(index - (CodeList.Count + AnswerLists.Count), iCode, iDescription, iParent, iChildren, iDescendents, iConcepts, iDescendantConcepts, iStem);
      result := Desc.GetEntry(iCode, lang);
    end
  end;
  
  function TLoincServices.Display(context: TCodeSystemProviderContext; const lang : THTTPLanguages): string;
  var
    index : cardinal;
    iCode, iDescription, iStems, iOtherNames, iOther : Cardinal;
    iEntry, iParent, iChildren, iDescendents, iConcepts, iDescendantConcepts, iStem : Cardinal;
    iComponent, iProperty, iTimeAspect, iSystem, iScale, iMethod, iClass : Cardinal;
    iFlags : Byte;
    ilang : byte;
  begin
    index := cardinal(context)-1;
    if index < CodeList.Count then
      CodeList.GetInformation(index, langsForLang(lang), result, iDescription, iOtherNames, iEntry, iStems, iComponent, iProperty, iTimeAspect, iSystem, iScale, iMethod, iClass, iFlags)
    else if index < CodeList.Count + AnswerLists.Count then
      FAnswerLists.GetEntry(index - CodeList.Count, iCode, iDescription, iOther)
    else
      FEntries.GetEntry(index - (CodeList.Count + AnswerLists.Count), iCode, iDescription, iParent, iChildren, iDescendents, iConcepts, iDescendantConcepts, iStem);
    result := Desc.GetEntry(iDescription, ilang);
  end;
  
  procedure TLOINCServices.Displays(context: TCodeSystemProviderContext; list: TStringList; const lang : THTTPLanguages);
  
negative.code: function TLoincServices.locate(code: String; var message : String): TCodeSystemProviderContext;
  var
    i : Cardinal;
    s : TLoincStrings;
  begin
    if CodeList.FindCode(code, i) then
      result := TLoincProviderContext.Create(lpckCode, i)
    else if Entries.FindCode(code, i, FDesc) then
      result := TLoincProviderContext.Create(lpckPart, i)
    else if AnswerLists.FindCode(code, i, FDesc) then
      result := TLoincProviderContext.Create(lpckAnswer, i)
    else
      result := nil;//raise ETerminologyError.create('unable to find '+code+' in '+system);
  end;
  