How to Create a Letter Template

CalMHSA has created letter templates for state required items, such as NOABDs. However, counties may need to create their own letter templates to suit their needs. Create a letter template in SmartCare is a multi-step process. We’ll break out these steps in different sections.

First: Create a Letter Template

  1. Click on the Search Icon
  2. Type in “Letter Templates” in the search bar
  3. Select “Letter Templates (Administration)” from the search results.
  1. This will bring up the Letter Templates list page. To create a new template, click the New icon.
  1. This brings you to the Letter Template Detail screen. Enter the Template Name. This is also what you’ll name the corresponding document and corresponding screen. NOTE: When naming your template, ensure you don’t use any special characters except a hyphen (-). CalMHSA recommends the following Naming Convention: “{CountyName} Letters – Letter Name”. Example: “Imperial Letters – Notice of Concern”
  2. Leave the Template Category blank for general letters.
  3. Write your letter. You can use the following tags for populating pertinent information dynamically.
    1. Client Information – Will pull data from the Client Information screen for the client you’re creating the letter for.
      1. If the client has more than one address, {{ClientAddress}} will pull the Mailing address first (if available), Home address next, and Billing address third.
      2. {{ClientPreferredName}} will pull from the Aliases tab in Client Information for the alias that’s marked as “Preferred Name”.
    2. Appointment Information – Will pull data from the next service appointment the client has.
      1. Type: Will pull the procedure code name. NOTE: this is not the display name, but rather than actual procedure code that’s in the Billing Manual
      2. Duration: Will pull the data from the Total Duration field
      3. With: Will pull the data from the Clinician field
      4. Mode of Delivery: Will pull the data from the Mode of Delivery field
    3. Selected Program Information – Will pull data from the Program Details screen, based on the program that’s associated with this letter (what’s selected from the CDAG dropdown by the user when creating the letter)
    4. County Information – Will pull data from the County Information screen
    5. Current User – Will pull data from the Staff Details screen for the user who is creating the letter
      1. Current User: Will pull the username that’s used to log into SmartCare
      2. Current User Signature: Will pull the signature that’s used when signing documents
Client Information Insert Statement Format
Last Name {{ClientLastName}} Last
First Name {{ClientFirstName}} First
First/Last Name {{ClientName}} First Last
Preferred Name {{ClientPreferredName}} First Last
Client ID {{ClientID}} Number
Prefix {{ClientPrefix}} Text
Date of Birth {{ClientDOB}} m/d/yy
Client Address {{ClientAddress}} 000 Street City, CA 00000
Appointment Information Insert Statement Format
Type {{TypeOfAppnt}} Text
Duration {{AppntDuration}} Integer
Day and Date {{AppntDayAndDate}} Friday, mm/dd/yyyy
Time {{AppntTime}} 8:00AM
With {{AppntWith}} First Last
Mode of Delivery {{ModeofDelivery}} Text
Selected Program Information Insert Statement Format
Address {{SelectedProgramAddress}} Text
Manager {{SelectedProgramManager}} Text
Phone {{SelectedProgramPhone}} (555) 555-5555
County Information Insert Statement Format
County Code {{CountyCode}} Integer
County Name {{County}} Text
Behavioral Health Department Name {{CountyBHDeptName}} Text
Hours of Operation {{CountyHours}} Text
County Address {{CountyAddress}} Text
County City {{CountyCity}} Text
County Zip {{CountyZip}} 55555
Main Phone Number {{CountyPhoneNumber}} 555-555-5555
TTY Phone Number {{CountyTTYPhoneNumber}} 555-555-5555
Accessibility Phone Number {{CountyAccessPhoneNumber}} 555-555-5555
Member Services 24/7 Phone Number {{CountyMemberServicesPhoneNumber}} 555-555-5555
Crisis Line Name {{CrisisLineName}} Text
Crisis Line Phone {{CrisisLineNumber}} 555-555-5555
Current User Insert Statement Format
Current User {{CurrentUser}} Text
Current Date {{CurrentDate}} Mmm dd, yyyy
Current Date & Time {{CurrentDateTime}} Mmm d yyyy h:mmAM/PM
Current User Signature {{CurrentUserSignature}} Text

Use the “County Generic Letter” to see an example of the formatting. This letter template is maintained by CalMHSA and is a demonstration of all the different insert statements.

To create a County Generic Letter, have a client open. Use the Search icon to find the screen “County Generic Letter”. If needed, click New. This will show you want the end user will see when creating a letter with these insert statements. Signing the test letter will show you what these insert statements will look like in PDF format.

  1. Once you’ve finished writing the letter, click Save and close.
  1. This takes you back to the list page. Note the Template ID for your letter template, as this will be used later.

Second: Create a Corresponding Document

  1. Click on the Search icon.
  2. Type in “Document Management” in the search bar.
  3. Select “Document Management (Administration)” from the search results.
  1. This brings up the Document Management list page. Click the New icon.
  1. This brings up the Document Codes Detail screen. In the Details section, set the fields below to the following values:
    1. Document Name: use the same name as the Letter Template Name in step 5 above
    2. View Document URL: CountyRDLGenericLetter
    3. View Document RDL: CountyRDLGenericLetter
    4. Table List: TextDocuments
    5. Document Type: Letters
    6. Service Note: No
    7. Active: Yes
    8. Requires Signature: Yes
    9. Only Available Online: No
    10. Editable After Signature: Yes
    11. Regenerate RDL on CoSignature: Yes
    1. Item k will result in a pop-up window alert. Click OK
  1. In the Stored Procedure section, set the fields below to the following values:
    1. Stored Procedure: csp_CalMHSACountyGenericLetter_Get
    2. Initialization: csp_CalMHSACountyGenericLetter_Init
  2. Click Save and close.

Third: Create a Corresponding Screen

  1. Click on the Search icon.
  2. Type in “Screens” in the search bar.
  3. Select “Screens (Administration)” from the search results.
  1. This brings you to the Screens list page. Click on the New icon.
  1. This brings you to the Screen Details page. Set the fields below to their corresponding values:
    1. Screen URL: \ActivityPages\Client\Detail\Documents\DocumentLetters.ascx
    2. Document: select the corresponding document name from above.
    3. Screen Name: use the same name as the document and letter template
    4. Click Yes on Refresh Permission
    5. Screen Parameters: LetterTemplateId=xx instead of xx, use the template id you noted above
    6. Screen Type: Document Page
    7. Navigtion Context: Client
    8. Active: Yes
    9. Initialization: csp_CalMHSACountyGenericLetter_Init
  2. Click Save and close.

Fourth: Make the Screen Searchable

CalMHSA will have to complete this step for you. Put in a Help Desk ticket with the name of the screen (from 5c in step 3 above) and request that this screen be made searchable by end users.

Fifth (optional): Create a Corresponding QuickLink

  1. Click on the Search icon.
  2. Type in “QuickLinks” in the search bar.
  3. Select “QuickLinks (Administration)” from the search results.
  1. This takes you to the QuickLinks list page. Click the New Icon.
  1. This takes you to the QuickLink Detail page. Set the fields below to their corresponding values:
    1. QuickLink: use the same name as your letter, document, and screen from steps above
    2. Display As: use the same name as your letter, document, and screen from steps aboveNavigation Context: Client
    3. Navigation Context: Client
    4. Parent QuickLink: Documents
    5. Screen: select the corresponding screen name from above
    6. Active: Yes
    7. Custom: No
  2. Click Save and close

Sixth: Add Permissions to Appropriate User Roles

  1. Click on the Search icon.
  2. Type in “Role Definition” in the search bar.
  3. Select “Role Definition (Administration)” from the search results.
  1. This takes you to the Role Definition page. Follow the instructions on how to edit permissions: see How to Modify Permissions in a Role. Please note that you’ll have to do this for each role you want to give access to. You’ll also need to grant the following permissions in order for someone to fully access your new letter. If you did not create a QuickLink, you can ignore this permission type, as it will not be available for you.
Permission TypeParent
ScreensClient
Document Codes (Edit) *N/A
Document Codes (View)N/A
QuickLinks (optional)Client

*Note: If you do NOT want a user role to be able to create this letter, you can forgo the Document Codes (Edit).

Updated 3/21/24