ISQuestion.CategoryID

Description

ID of the short code of type 'Accession Patient Question'.

Syntax

object.CategoryID

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

Return Value

int

Example

Display the number of questions and some information about them, including their categories.

Dim aPatient
Dim aQuestions, aQuestion
Dim aMessage
Dim i
Dim aCategory

Set aPatient = Profile.SelectPatient
set aQuestions = Profile.ProfileInternal.LoadQuestionsForPatient(aPatient.ID)

aMessage = "Questions Count = " & aQuestions.Count
for i = 0 to aQuestions.Count - 1
  set aQuestion = aQuestions.Item(i)
  set aCategory = Profile.LoadShortCode(aQuestion.CategoryId)
  aMessage = aMessage & vbNewLine &_
    "Title: " & aQuestion.Title & vbNewLine &_
    "Amend Date: " & aQuestion.AmendDate & vbNewLine &_
    "Answer: " & aQuestion.Answer & vbNewLine &_
    "Body: " & aQuestion.Body & vbNewLine &_
    "Date: " & aQuestion.Date & vbNewLine &_
    "Patient: " & aPatient.SurnameFirstName & vbNewLine &_
    "Status: " & aQuestion.Status & vbNewLine &_  
    "Category: " & aCategory.Description & vbNewLine 
next
Profile.MsgBox(aMessage)       
Note:

In Profile Client v8 on User Interface Category ID cannot be found, but Category can be found in Organisation > Work Centre > Work > Patient Items > Filter > Edit Filters > Question category.

Version information

Added in v7.8.0