ISInvoiceLine.Diagnosis2

Description

The second diagnosis associated with the service that is being invoiced.

Syntax

object.Diagnosis2

Part Attribute Type Description
object Required
The object always implements the ISInvoiceLine interface

Return Value

ISDisease

Example

Display the number of the invoices loaded on the basis of the selected filter and some information about the invoice lines, including the second diagnoses associated with the services.

Dim aPatient
Dim aFilter
Dim aInvoices, aInvoice 
Dim aInvoiceLines, aInvoiceLine 
Dim aMessage
Dim i, j    

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateInvoiceFilter
aFilter.PatientId = aPatient.ID
set aInvoices = aFilter.Load

aMessage = "Invoices Count = " & aInvoices.Count & vbNewLine

for i = 0 to aInvoices.Count - 1
  set aInvoice = aInvoices.Items(i)
  set aInvoiceLines = aInvoice.InvoiceLines 
  aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
    "Date: " & aInvoice.Date & vbNewLine &_
    "    ID: " & aInvoice.ID & vbNewLine &_
    "    Invoice Lines Count: " & aInvoiceLines.Count & vbNewLine 
  for j = 0 to aInvoiceLines.Count - 1
    set aInvoiceLine = aInvoiceLines.Item(j)
    aMessage = aMessage & (i + 1) & "." & (j + 1) &_
      " -Description: " & aInvoiceLine.Description & vbNewLine &_
      "      -DateTime From: " & aInvoiceLine.DateTimeFrom & vbNewLine &_
      "      -DateTime To: " & aInvoiceLine.DateTimeTo & vbNewLine
    if not aInvoiceLine.Diagnosis1 is nothing then 
      aMessage = aMessage & "      -Diagnosis 1: " &_
        aInvoiceLine.Diagnosis1.Description & vbNewLine
    end if
    if not aInvoiceLine.Diagnosis2 is nothing then 
      aMessage = aMessage & "      -Diagnosis 2: " &_
        aInvoiceLine.Diagnosis2.Description & vbNewLine
    end if
    if not aInvoiceLine.Diagnosis3 is nothing then 
      aMessage = aMessage & "      -Diagnosis 3: " &_
        aInvoiceLine.Diagnosis3.Description & vbNewLine
    end if
  next 'j    
next 'i    

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Diagnosis 2 can be found in Financial > Audit Transactions > Invoices > Open the selected invoice > Open Detail for the selected invoice line > Diagnosis 2 field.

Version information

Added in v7.8.0