Consumer medicine information for the Rx item, that is returned in the HTML browser.
object.HTMLStream
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCmiDetail interface |
Display Cmi details for the Rx items, loaded on the basis of the selected filter, in the HTML browser.
sub main
Dim aFilter
Dim aRxCollection, aRx
Dim aHTML, aHTMStream, aHTMLPart
Dim aContents
Dim aCmiDetail
Dim i, j
Dim aMessage
Set aFilter = Profile.CreateRxFilter
aFilter.RxName = "Pendine"
set aRxCollection = Profile.LoadRxCollection(aFilter)
aHTML = ""
aContents = ""
for i = 0 to aRxCollection.Count - 1
set aRx = aRxCollection.Item(i)
for j = 0 to aRx.CmiDetailCount - 1
set aCmiDetail = aRx.CmiDetail(j)
set aHTMStream = aCmiDetail.HTMLStream
aContents = aContents & "<li><a href='#" & GetDetailLink(i, j) & "'>" &_
aRx.AsString & " - CMI Detail #" & (j + 1) & "</a></li>"
aHTMLPart = FixHTML(aHTMStream.AsString)
aHTML = aHTML & "<hr>" &_
"<a name='" & GetDetailLink(i, j) & "'>" &_
"<p>" & aRx.RxSystem.Name & "</p>" & aHTMLPart
next 'j
next 'i
aHTML = "<H1>Search Results</H1>" &_
"<p>for the Rx name with substring '" & aFilter.RxName & "':</p>" & _
aContents & aHTML
Profile.ShowHTML aHTML, "Loaded Formulary"
end sub
function GetDetailLink(aRxIndex, aDetailIndex)
Dim aLink
aLink = "Rx" & aRxIndex & "_" & aDetailIndex
GetDetailLink = aLink
end function
function FixHTML(aHTML)
Dim aBodyTagStart, aBodyTagEnd
Dim aEndBodyTagStart
Dim aResult
aBodyTagStart = InStr(1, aHTML, "<BODY", vbTextCompare)
aBodyTagEnd = InStr(aBodyTagStart, aHTML, ">")
aEndBodyTagStart = InStr(aBodyTagEnd, aHTML, "</BODY")
aResult = Mid(aHTML, aBodyTagEnd + 1, aEndBodyTagStart - aBodyTagEnd - 1)
FixHTML = aResult
end function
In Profile Client v8 on User Interface Cmi details can be found in
, in or in .