Inserting a Context Group Example for VB.NET

Private Sub InsertContextGroup(ByRef objDS As LTDICLib.LEADDicomDS)
   
' Context Group Version
   
objDS.DateTimeValueCount = 1
   
With objDS.DateTimeValues(0)
      
.Year = 2005
      
.Month = 3
      
.Day = 22
      
.Hours = 0
      
.Minutes = 0
      
.Seconds = 0
      
.Fractions = 0
      
.Offset = 0
   
End With

   ' Insert a (testing) Context Group
   
objDS.InsertContextGroup("CID XXXX", "New Context Group", True)

   objDS.DateTimeValueCount = 0

   ' Fill the Context Group with some (testing) Coded Concepts
   
objDS.InsertCodedConcept("CSD1", "", "CV1", "CM1")
   
objDS.InsertCodedConcept("CSD2", "", "CV2", "CM2")
   
objDS.InsertCodedConcept("CSD3", "", "CV3", "CM3")

   ' Refer to Enumerating the Coded Concepts of a Context Group Example
   
' for VB.NET for the procedure EnumCodedConcepts EnumCodedConcepts(objDS)

   ' Delete the Context Group
   
objDS.DeleteContextGroup()
End Sub