Create a Custom Object for Patient Data

Charles has been undergoing physical therapy sessions for a few months now. Leif wants to track Charles’s progress. The timeline can display details for any object that’s related to the patient through the Account object. There is no Salesforce object or Health Cloud object specific to physical therapy, so let’s create a custom object.

Create a Custom Object

  1. From Setup, go to the Object Manager.
  2. Click Create and select Custom Object.
  3. Define a new custom object:
    1. Label: Physical Therapy Session
    2. Plural Label: Physical Therapy Sessions
    3. Object Name: Physical_Therapy_Session
    4. Description: A custom object to track physical therapy sessions.
  4. Define the record name label and format:
    1. Record Name: Physical Therapy Session Name (autofilled)
    2. Data Type: Auto Number
    3. Display Format: OF-{0000}
    4. Starting Number: 0
  5. Under Optional Features, select Allow Activities and Track Field History.
  6. Under Search Status, select Allow Search.
  7. Under Object Creation Options, select Launch New Custom Tab Wizard after saving this custom object.
  8. Save the custom object.

Next, we create a tab for the new Physical Therapy Session object.

  1. In the New Custom Object Tab page, click the Tab Style field and select Pencil.
  2. Click Next | Next | Save.

Add Custom Fields

Now that we have a Physical Therapy Session object, we can add some custom fields.

  • Duration
  • Account
  • Session Date
  • Therapy Type
  • Is Visible on Patient Card

Create a Duration Field

  1. If it’s not already open, open the Physical Therapy Session object to Fields and Relationships.
  2. Click New.
  3. For Data Type, select Number and then click Next.
  4. Name the field:
    1. Field Label: Duration
    2. Length: 18 (default)
    3. Decimal: 0 (default)
    4. Click anywhere to autofill Field Name: Duration
  5. Click Next.
  6. Accept the default field-level security settings and click Next.
  7. Accept the default page layouts and click Save & New.

Create an Account Field

  1. For Data Type, select Lookup Relationship and then click Next.
  2. For Related To, click Account and then click Next.
  3. Name the field:
    1. Field Label: Account (default)
    2. Click anywhere to autofill Field Name: Account
  4. Click Next | Next | Next.
  5. Click Save & New.

Create a Session Date Field

  1. For Data Type, select Date/Time and then click Next.
  2. Name the field:
    1. Field Label: Session Date
    2. Click anywhere to autofill Field Name: Session_Date
  3. Click Next | Next | Save & New.

Create a Therapy Type Field

  1. For Data Type, select Picklist and then click Next.
  2. For Field Label, enter Therapy Type.
  3. Select Enter values, with each value separated by a new line.
  4. Enter picklist values:
    • Joint Pain
    • Spinal Injury
    • Post-Operative Care
  5. Click Next | Next | Save & New.

Create an Is Visible on Patient Card Field

  1. For Data Type, select Formula and then click Next.
  2. For Field Label, enter Is Visible on Patient Card.
  3. For Formula Return Type, select Checkbox.
  4. Click Next.
  5. Click Advanced Formula.
  6. Under Is Visible on Patient Card (Checkbox) =, enter NOT(ISBLANK(Name)).
    This formula says that this custom object, physical therapy session, is visible on the patient card any time the physical therapy session’s Name field is not blank. Effectively, that means that all physical therapy sessions are always visible on the patient card.
  7. Click Check Syntax.
  8. Under Blank Field Handling, select Treat blank fields as blanks.
  9. Click Next | Next | Save.

Your new Physical Therapy Session object should have these fields and relationships.

Field Label Field Name Data Type
Account Account__c Lookup(Account)
Created By CreatedById Lookup(User)
Duration Duration__c Number(18, 0)
Is Visible on Patient Card Is_Visible_on_Patient_Card__c Formula(Checkbox)
Last Modified By LastModifiedById Lookup(User)
Owner OwnerId Lookup(User,Group)
Physical Therapy Session Name Name Auto Number
Session Date Session_Date__c Date/Time
Therapy Type Therapy_Type__c Picklist

In the following steps, you use these custom fields to create a patient timeline view configuration, a patient card, and a patient list.


Continue a aprender de graça!
Inscreva-se em uma conta para continuar.
O que você ganha com isso?
  • Receba recomendações personalizadas para suas metas de carreira
  • Pratique suas habilidades com desafios práticos e testes
  • Monitore e compartilhe seu progresso com os empregadores
  • Conecte-se a orientação e oportunidades de carreira