LDicomContextGroup::GetFirstCodedConcept

#include "ltdic.h"

static pDICOMCODEDCONCEPT LDicomContextGroup::GetFirstCodedConcept(pContextGroup)

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

Parameters

pDICOMCONTEXTGROUP 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

Value Meaning
!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:

LDicomContextGroup::GetLastCodedConcept

LDicomContextGroup::GetNextCodedConcept

LDicomContextGroup::GetPrevCodedConcept

You can also use the LDicomContextGroup::GetCountCodedConcept and LDicomContextGroup::FindIndexCodedConcept functions to enumerate the Coded Concepts.

Use the LDicomContextGroup::GetContextGroup function to obtain the Context Group to which a Coded Concept belongs.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_VOID EnumCodedConcepts(pDICOMCONTEXTGROUP pGroup) 
{ 
   // Is it a valid pointer?  
   if (!LDicomContextGroup::Exists(pGroup))  
   { 
      return;  
   } 
 
   pDICOMCODEDCONCEPT pConcept;  
 
   // Enumerate the Coded Concepts in the Context Group (3 possible ways)  
#if 1 
 
   // One possible way to enumerate the Coded Concepts 
   pConcept = LDicomContextGroup::GetFirstCodedConcept(pGroup);  
   while (pConcept)  
   { 
      // Refer to the example of LDicomContextGroup::GetContextGroup for 
      // the function GetContextGroupExample 
      if(!DisplayCodedConcept(pConcept, TRUE)) 
      { 
         break; 
      } 
 
      pConcept = LDicomContextGroup::GetNextCodedConcept(pConcept);  
   } 
 
#elif 0 
    
   // Another way to enumerate the Coded Concepts 
   L_UINT32 uConceptsCount;  
   uConceptsCount = LDicomContextGroup::GetCountCodedConcept(pGroup);  
   for (L_UINT32 i = 0; i < uConceptsCount; i++) 
   { 
      pConcept = LDicomContextGroup::FindIndexCodedConcept (pGroup, i);  
      if(!DisplayCodedConcept(pConcept, TRUE)) 
      { 
         break; 
      } 
   } 
 
#elif 0 
 
   // A third way to enumerate the Coded Concepts 
   pConcept = LDicomContextGroup::GetLastCodedConcept(pGroup);  
   while (pConcept)  
   { 
      if(!DisplayCodedConcept(pConcept, TRUE)) 
      { 
         break; 
      } 
 
      pConcept = LDicomContextGroup::GetPrevCodedConcept(pConcept);  
   } 
 
#endif 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.