L_DicomGetFirstCodedConcept

#include "ltdic.h"

pDICOMCODEDCONCEPT EXT_FUNCTION L_DicomGetFirstCodedConcept(pContextGroup)

pDICOMCONTEXTGROUP pContextGroup;

/* pointer to a Context Group */

Returns a pointer to the first Coded Concept in the specified Context Group.

Parameter

Description

pContextGroup

Pointer to a DICOMCONTEXTGROUP structure that specifies a Context Group in the Context Group Table. The function returns a pointer to the first Coded Concept in this Group, if it contains any.

Returns

!NULL

Pointer to a DICOMCODEDCONCEPT structure that specifies the first Coded Concept in the specified Context Group.

NULL

The specified Context Group does not contain any Coded Concepts.

Comments

Along with this function, the following functions can be used to maneuver through the Coded Concepts of a Context Group in the Context Group Table:

L_DicomGetLastCodedConcept

L_DicomGetNextCodedConcept

L_DicomGetPrevCodedConcept

You can also use the L_DicomGetCountCodedConcept and L_DicomFindIndexCodedConcept functions to enumerate the Coded Concepts.

Use the L_DicomGetCodedConceptGroup function to determine which Context Group contains a specific Coded Concept.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_DicomLoadContextGroup, L_DicomInsertContextGroup, L_DicomGetLastCodedConcept, L_DicomGetNextCodedConcept, L_DicomGetPrevCodedConcept, L_DicomGetCountCodedConcept, L_DicomFindIndexCodedConcept, L_DicomGetCodedConceptGroup, L_DicomSetCodedConceptCodeMeaning, L_DicomDeleteCodedConcept, L_DicomGetFirstContextGroup

Topics:

Working with Context Groups

Example

L_VOID EnumCodedConcepts(pDICOMCONTEXTGROUP pGroup)
{
   pDICOMCODEDCONCEPT pConcept; 

   // Is it a valid pointer? 
   if (!L_DicomExistsContextGroup (pGroup)) 
   {
      return; 
   }

   // Enumerate the Coded Concepts in the Context Group (3 possible ways) 
#if 1

   // One possible way to enumerate the Coded Concepts
   pConcept = L_DicomGetFirstCodedConcept(pGroup); 
   while (pConcept) 
   {
      // Refer to the example of L_DicomGetCodedConceptGroup for
      // the function DisplayCodedConcept
      if (!DisplayCodedConcept(pConcept, TRUE)) 
      {
         break; 
      }

      pConcept = L_DicomGetNextCodedConcept (pConcept); 
   }

#elif 0
   
   // Another way to enumerate the Coded Concepts
   uConceptsCount = L_DicomGetCountCodedConcept (pGroup); 
   for (i = 0; i < uConceptsCount; i++)
   {
      pConcept = L_DicomFindIndexCodedConcept (pGroup, i); 
      if (!DisplayCodedConcept(pConcept, TRUE)) 
      {
         break; 
      }
   }

#elif 0

   // A third way to enumerate the Coded Concepts
   pConcept = L_DicomGetLastCodedConcept (pGroup); 
   while (pConcept) 
   {
      if (!DisplayCodedConcept(pConcept, TRUE)) 
      {
         break; 
      }

      pConcept = L_DicomGetPrevCodedConcept (pConcept); 
   }

#endif
}