TeleWellness Portal
  • Introduction
  • HELPFUL RESOURCES
    • Getting Started
    • FAQ
      • Appointments
      • Meal Plan
  • User Management
    • Roles and Permissions
    • Manage Coaches
      • Coach tab
        • Register a new coach
          • Assign Members
        • Edit an existing coach
      • Calendar tab
        • Appointment Types
        • Appointment Alerts
      • Note Templates tab
    • Manage Members
      • Create a new member
      • Edit member's information
      • Filter members
  • Using the TeleWellness Portal
    • Login and logout to the Portal
    • Navigating the TeleWellness Portal
      • Home
      • Dashboard
      • Admin Dashboard
      • Coach Dashboard
        • Progress Tab
          • Filtering the information
          • Checking the user’s streak progress
          • Checking the user's activities progress
          • Showing the food log history
          • Checking the user's recap questions
          • Checking the user's weight log history
          • Showing user’s program journey
          • Checking user’s water intake history
        • Meal Plan tab
        • Notes tab
        • Appointments tab
        • Lab Tests tab
        • Wellness Plans tab
      • Messages
      • Meal Plans
        • Manage Meal Plans
          • From Scratch
          • Smart Meal Plan
      • Scheduling
      • Wellness Plan
        • Manage Protocols
        • Manage Wellness Plan Templates
    • Note Templates
  • API Reference
    • Generate Authorization Token
    • Appointments
      • Appointment Types
      • Add Appointment Credits
    • Coaches
      • Coach List
      • Update a Coach
      • Create a Coach
      • Invite Coach
    • Members
      • Member List
      • Members List
      • Program List
      • Update member's program
      • Assign Coach to Member
    • Lab Test Reports
      • Lab Test Report List
      • Create a Lab Test Report
      • Update Lab Test Report
      • Delete a Lab Test Report
    • Wellness Plans
      • Create a Supplement Plan for Member
      • Update Member Supplement
      • List Member Supplement Plans
      • Delete Member Supplement Plan
Powered by GitBook
On this page
  • Required Argument
  • Available fields
  • Example
  1. API Reference
  2. Lab Test Reports

Create a Lab Test Report

Use the createLabTestReport mutation to create a lab test report.

Required Argument

Argument Name

Type

Description

testName

String

Lab test report name

testDate

DateTime

Date and time when the lab test report is created.

labName

String

Laboratory name

title

String

Lab test report title

Available fields

The following fields will be displayed in the response:

Field Name

Type

Description

success

Boolean

True if the lab test report has been created successfully. Otherwise, Flase

message

String

Description of the result

report

Object

Example

Because it is not possible to upload files in the GraphQL playground, the following example creates a lab test report using the Postman tool.

Step 1. Create the mutation

Define the variables and their corresponding values:

{"query": "mutation CreateLabTest($memberId: ID!, $testName: String!, $testDate: DateTime!, $labName: String!, $title: String!, $reportPdf: Upload!) {createLabTestReport(memberId:$memberId testName: $testName testDate: $testDate labName: $labName title: $title reportPdf: $reportPdf) {success message }}","variables": {"memberId": "TWVtYmVyOjVlZDk5MjMyLWNhMTMtNGE2NS05MmIyLWZjMDk4ZjgyOWUwNA==", "testName": "Hormone Testing", "testDate": "2022-02-03T10:01:01", "labName": "Lab Test", "title": "Report Test", "reportPdf": null}}

Note: Replace the memberId with your personal information.

SET UP POSTMAN

Step 2: Add the URL server, select the POST method and add the Header

POST https://production.suggestic.com/cp/graphql

Headers

Name
Type
Description

Authorization*

Bearer <JSON Token>

JSON Token

Step 3: Add the Body information

Click on the form-data option within the Body option and add the following 3 Key values:

  • operations: Add the mutation defined in step 1.

  • map: Map the files to your mutation.

  • 0: Choose the file type to upload your PDF file.

POST https://production.suggestic.com/cp/graphql

Request Body

Name
Type
Description

operations*

{"query": "mutation CreateLabTest($memberId: ID!, $testName: String!, $testDate: DateTime!, $labName: String!, $title: String!, $reportPdf: Upload!) {createLabTestReport(memberId:$memberId testName: $testName testDate: $testDate labName: $labName title: $title reportPdf: $reportPdf) {success message }}","variables": {"memberId": "TWVtYmVyOjVlZDk5MjMyLWNhMTMtNGE2NS05MmIyLWZjMDk4ZjgyOWUwNA==", "testName": "Tester", "testDate": "2021-09-01T10:01:01", "labName": "Lab Test", "title": "Report Test", "reportPdf": null}}

Mutation

map*

{"0":["variables.reportPdf"]}

Map the files

0*

lab-test-report.pdf

Upload the PDF File

{
    // Response
}

The response will be:

{
 "data": {
    "createLabTestReport": {
        "success": true,
        "message": "Lab Test Report was successfully created"
    }
 }

Within the TeleWellness Portal, the created lab test is displayed as follows:

PreviousLab Test Report ListNextUpdate Lab Test Report

Last updated 3 years ago

Object that returns the information of the

lab test report