ISCaseEquipLoan.CaseID

Description

ID of the case the equipment loan is for, if applicable.

Syntax

object.CaseID

Part Attribute Type Description
object Required
The object always implements the ISCaseEquipLoan interface
Restriction: This property is readonly.

Return Value

int

Example

Display the number of the case equipment loans loaded on the basis of the selected filter and some information about them, including IDs of the cases the equipment loans are for.

Dim aResult
Dim aPatientId
Dim aCaseID
Dim aFilter
Dim aCaseEquipLoans, aCaseEquipLoan
Dim aPatient
Dim aMessage
Dim i

aResult = Profile.Lookup_PatientCaseSearch(aPatientId, aCaseID, _
  "Select Case for search", true)
  
if not aResult then exit sub    

set aFilter = Profile.CreateCaseEquipLoanFilter
aFilter.OnlyReturned = False
aFilter.OnlyNotReturned = False
aFilter.CaseID = CaseID
set aCaseEquipLoans = Profile.LoadCaseEquipLoans(aFilter)

aMessage = "Case Equipment Loans Count = " & aCaseEquipLoans.Count & vbNewLine

for i = 0 to aCaseEquipLoans.Count - 1
  set aCaseEquipLoan = aCaseEquipLoans.Item(i)
  set aPatient = Profile.LoadPatient(aCaseEquipLoan.PatientId) 
  aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
    "Started On: " & aCaseEquipLoan.StartedOn & vbNewLine &_
    "Expected On: " & aCaseEquipLoan.ExpectedOn & vbNewLine &_
    "Patient: " & aPatient.SurnameFirstName & vbNewLine &_
    "Comment: " & aCaseEquipLoan.Comment & vbNewLine &_
    "ID: " & aCaseEquipLoan.ID & vbNewLine &_
    "Loan Item: " & Profile.LoadServiceByID(aCaseEquipLoan.ItemID).Description & vbNewLine &_
    "Is Returned: " & aCaseEquipLoan.IsReturned & vbNewLine
  if aCaseEquipLoan.CaseID > 0 then
    aMessage = aMessage & "Case: " & Profile.OpenCase(aCaseEquipLoan.CaseID).CaseTitle & vbNewLine
  else
    aMessage = aMessage & "Case: -" & vbNewLine  
  end if 
next

Profile.MsgBox(aMessage)    
Note:

In Profile Client v8 on User Interface Case ID cannot be found, but Case can be found in Clinical > Medical Record > Equipment > Open the selected equipment loan > Case or in Clinical > Medical Record > Cases > Open the selected case > Equipment > Open the selected equipment loan > Case.

Version information

Added in v7.8.0