Class ID of the CDO text content.
object.TypeID
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCDOText interface |
int
Display the number of the patient measures loaded on the basis of the selected filter and some information about them.
sub main
Dim aPatient
Dim aPatientMeasureFilter, aPhysQuantity
Dim aConcept
Dim aMeasures, aMeasure
Dim aContent
Dim aText
Dim i, j
Dim aMessage
const CID_IBCDO_MultiText = 100620
const CID_IBCDO_Text = 100610
set aPatient = Profile.SelectPatient
set aPatientMeasureFilter = Profile.CreatePatientMeasureFilter
set aConcept = Profile.Concept("IH", "IH009")
aPatientMeasureFilter.MeasureType = 3 ' pmtBoth
aPatientMeasureFilter.Concept = aConcept
set aMeasures = aPatient.GetMeasuresByFilter(aPatientMeasureFilter, aPhysQuantity)
aMessage = "Measures Count = " & aMeasures.Count & vbNewLine
for i = 0 to aMeasures.Count - 1
set aMeasure = aMeasures.Item(i) 'ISHRI
aMessage = aMessage & vbNewLine & (i + 1) & ") " & " Name: " & aMeasure.Name
set aContent = aMeasure.Content
if not aContent is nothing then
aMessage = aMessage & vbNewLine &_
" Content Type Id: " & aContent.TypeID
select case aContent.TypeId
case CID_IBCDO_MultiText
aMessage = aMessage & vbNewLine &_
"Content As String: " & aContent.AsString & vbNewLine &_
"Content Item Count: " & aContent.Count & vbNewLine &_
"Content Items:" & vbNewLine
for j = 0 to aContent.Count - 1
set aText = aContent.Item(j)
aMessage = aMessage & (j + 1) & ") " &_
GetCDOTextInformation(aText) & vbNewLine
next 'j
case CID_IBCDO_Text
aMessage = aMessage & vbNewLine &_
GetCDOTextInformation(aContent) & vbNewLine
end select
end if
next 'i
Profile.MsgBox(aMessage)
end sub
function GetCDOTextInformation(aCdoText)
Dim aInfo
Dim aUD
aInfo = aInfo &_
" Content Type ID: " & aCdoText.TypeID & vbNewLine &_
" Content Value: " & aCdoText.Value & vbNewLine &_
" Content Value As String: " & aCdoText.AsString & vbNewLine &_
" Get Content Value As String: " & aCdoText.GetValueAsString & vbNewLine &_
" Content Reference Range Comment: " & aCdoText.ReferenceRangeComment & vbNewLine &_
" Content Reference Range Origin: " & aCdoText.ReferenceRangeOrigin & vbNewLine
set aUD = aCdoText.UnitDimension
if aUD is nothing then
aInfo = aInfo & " No Unit Dimension is assigned" & vbNewLine
else
aInfo = aInfo &_
" Unit Dimension Name: " & aUD.Name & vbNewLine
end if
GetCDOTextInformation = aInfo
end function