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
- From Setup, go to the Object Manager.
- Click Create and select Custom Object.
- Define a new custom object:
- Label:
Physical Therapy Session
- Plural Label:
Physical Therapy Sessions
- Object Name:
Physical_Therapy_Session
- Description:
A custom object to track physical therapy sessions.
- Label:
- Define the record name label and format:
- Record Name: Physical Therapy Session Name (autofilled)
- Data Type: Auto Number
- Display Format:
OF-{0000}
- Starting Number:
0
- Under Optional Features, select Allow Activities and Track Field History.
- Under Search Status, select Allow Search.
- Under Object Creation Options, select Launch New Custom Tab Wizard after saving this custom object.
- Save the custom object.
Next, we create a tab for the new Physical Therapy Session object.
- In the New Custom Object Tab page, click the Tab Style field and select Pencil.
- 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
- If it’s not already open, open the Physical Therapy Session object to Fields and Relationships.
- Click New.
- For Data Type, select Number and then click Next.
- Name the field:
- Field Label:
Duration
- Length:
18
(default) - Decimal:
0
(default) - Click anywhere to autofill Field Name:
Duration
- Field Label:
- Click Next.
- Accept the default field-level security settings and click Next.
- Accept the default page layouts and click Save & New.
Create an Account Field
- For Data Type, select Lookup Relationship and then click Next.
- For Related To, click Account and then click Next.
- Name the field:
- Field Label:
Account
(default) - Click anywhere to autofill Field Name:
Account
- Field Label:
- Click Next | Next | Next.
- Click Save & New.
Create a Session Date Field
- For Data Type, select Date/Time and then click Next.
- Name the field:
- Field Label:
Session Date
- Click anywhere to autofill Field Name: Session_Date
- Field Label:
- Click Next | Next | Save & New.
Create a Therapy Type Field
- For Data Type, select Picklist and then click Next.
- For Field Label, enter
Therapy Type
. - Select Enter values, with each value separated by a new line.
- Enter picklist values:
Joint Pain
Spinal Injury
Post-Operative Care
- Click Next | Next | Save & New.
Create an Is Visible on Patient Card Field
- For Data Type, select Formula and then click Next.
- For Field Label, enter
Is Visible on Patient Card
. - For Formula Return Type, select Checkbox.
- Click Next.
- Click Advanced Formula.
- 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. - Click Check Syntax.
- Under Blank Field Handling, select Treat blank fields as blanks.
- 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.