Creating a Design Plan for the client as a Clinic

Making a Design Plan for your client as a Clinic.

Suppose you want to design a scheduled mental health programme for your Client before assigning them to a Care Provider. Design Plans can help you with it. Clinics can plan ahead weeks of homework so the Care Providers will have less to worry about during their mental health Sessions. Please note, Design Plan is an advanced feature and using it demands a good knowledge of the system, for making a Design Plan a Clinic should follow these instructions:

1- Request URL:

https://gwidev.eq.optt.ca/gateway/profile/clinic/design-plan

2- Request Method Type:
POST

3- Body

{
  "appointmentDesc": "test1",
  "appointmentTitle": "test1",
  "caregiverId": 46,
  "clinicId": 2,
  "createdDate": "12/8/20 4:05 PM",
  "planName": "test1",
  "weeks": [
    {
      "assignments": [
        {
          "assignReminds": [
            {
              "reminderDay": 1,
              "time": "17:10"
            }
          ],
          "bookId": 3
        }
      ],
      "name": "week1",
      "ordering": 1
    }
  ]
}

Body Description

Parameter Name

Parameter Type

Description

name

String

The name for the design plan, which is mandatory

createDate

Date[yyyy/MM/dd HH:mm]

Date of creation

appointmentTitle

String

This title will be used for creating new Sessions according to this design plan

appointmentDesc

String

This description will be used for creating new Sessions according to this design plan

weeks

List

A list of Week Models which describes following weeks of the plan for the Client

4- Additional Models you need to know:

1- WeekModel{ “name”: [String], “ordering: [Integer], “assignments”: [List]}
2- AssignmentModel{ “assignReminds”: [List], “bookId”: [Long] }
3- AssignRemindModel{ “reminderDay”: [Integer], “time”: [String] }
4- DesignPlanModel{ “id”: [Long], “planName”: [String], “createdDate”: [Date(jsonified)], “appointmentTitle”: [String], “appointmentDesc”: [String], “clinicId”: [Long], “caregiverId”: [Long], “weeks”: [List] }

A complete example of an API call:

curl -X POST "https://gwidev.eq.optt.ca/gateway/profile/clinic/design-plan" -H "accept: */*" -H "Authorization: bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM3NTgyMDY0NDQsInVzZXJfbmFtZSI6ImxhbGVoQG9wdHQuY2EiLCJhdXRob3JpdGllcyI6WyJDTElOSUMiXSwianRpIjoiMjU5NTgwMTAtZWVkMC00MThkLTlmNzctZWU1YzA3OWU0Mzc3IiwiY2xpZW50X2lkIjoib3B0dC0wMmVlNzdkYy1hYzQ1LTQzNDQtODE3ZS0xN2NhNTJiNThiNWQiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXX0.Qx07ooEYUh_i6p-ieR1w__IKj8AxIC7qeOXRHYRqJkh1IYo_wGmM1zv_qaiB9e9Gxk9yob8NalQsyJ5Knte08vyEg3bAF94fey1rXBjbmgwsLtz9lH2GaIqyw030vCv7fbbw1q-R2-drM31dRmhRy981gykA0Vo-F2ypOnYeu7FcJJxLGVs8Tu4bImCDNsKeqkCj81R_j3YFu1uigYjPbWzCRFG6xKATJrGU-fFhbr_m-WpiIIFZCoi12EK18C_Ikf1ClBDk78GHYEs6NFb4hH7Hmd5yQjDHwtgQb78uzWMUS7jQYtYw7W3tULCT3K_FZRJBNwMxWAbRMHQVcLoFRA" -H "offset: 1" -H "Content-Type: application/json" -d "{ \"appointmentDesc\": \"test1\", \"appointmentTitle\": \"test2\", \"caregiverId\":46, \"clinicId\": 2, \"createdDate\": \"02/10/20 02:29 PM\", \"planName\": \"tets\", \"weeks\": [ { \"assignments\": [ { \"assignReminds\": [ { \"reminderDay\": 1, \"time\": \"20:10\" } ], \"bookId\": 26 } ], \"name\": \"test\", \"ordering\": 1 } ]}"

Response:

access-control-allow-credentials: true 
 access-control-allow-origin: https://gwidev.eq.optt.ca 
 cache-control: max-age=1, no-cache 
 connection: keep-alive 
 content-length: 0 
 date: Tue, 09 Feb 2021 21:59:39 GMT 
 expires: Tue, 09 Feb 2021 21:59:40 GMT 
 location: /design-plan/58 
 pragma: no-cache 
 server: nginx/1.14.0 (Ubuntu) 
 vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Origin 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block