Feature Blocks
Mydex uses the Feature Blocks listed below to work across both pur People and Service Apps. They are configured for each context as part of deployment but their experience layer is the same as they are built from our Mydex Design System to ensure consistency in the experience regardless of context and benefit from our WCAG 2.1 compliance and responsive web design as standard.
We provide subscribers with API access to interact with these features from subscribers' own back office applications e.g. case management and CRM systems as well as clinical and care systems or their own people facing apps either via Web or Device based apps.
We seek to provide our third party integrators and subscribers with access to these Feature Blocks via our PDX API and have three different release levels as follows:
- Alpha An initial phase of release to support testing by third party integrators on our Alpha release programme. Alpha releases can be used in our Sandbox and Live Environments.
- Beta A pre full release but close to full release version which can be used in our Sandbox and Live Environments.
- Live Our full released Live Feature Block available on Sandbox and Live Environment.
Please click on a feature block to find out more.
About Me
Live
Overview
The document explains the Mydex Modular About Me Feature Block (MAM), its creation, and management using the Mydex Safe Secure Cloud's interoperability features, particularly the Mydex Template System and Personal Data eXchange.
Modular About Me enables individuals to build up a bank of detailed information about themselves that they can share safely, easily, and quickly with service providers. This eliminates or greatly reduces the need for forms, allowing service providers to safely and confidently use the data immediately.
Modular About Me, during its design and development by Mydex CIC, benefitted from stakeholder engagement and feedback from citizens and service providers facilitated by the Digital Health and Care Innovation Centre’s Research and Innovation Programme. This process helped validate the range and scope of its contents alongside the PRSB About Me v1 published standard.
Modular About Me addresses one of the most commonly reported frustrations citizens have with accessing public services — having to repeat themselves and tell their story repeatedly with each service provider they are referred to.
- MAM Structure: MAM is modular, containing six main modules, fifty-eight subsections, and about 700 data points. These are designed to capture core information needed for effective support and self-management of health and wellbeing.
- Control and Access: The information within MAM is under the control of the individual and stored in their Personal Data Store within the Mydex Safe Secure Cloud. Individuals (Members) can access and share their information via the Mydex People App.
- Mydex Safe Secure Cloud: This is a shared infrastructure where individuals are at the centre, with their data under their control. Members have free-for-life access and use of the Safe Secure Cloud. As a mission-locked community interest company, Mydex operates the Safe Secure Cloud for public benefit and sustainability as shared infrastructure.
- Organisations: Organisations that subscribe to the Safe Secure Cloud can access and update the individual's MAM and wider event and transactional data records delivered to and stored in their Personal Data Store.
- Interoperability: Interoperability is a core driver of MAM. It facilitates interoperability and data sharing between individuals and service providers through APIs and GDPR-compliant Data Sharing and Service Agreements. This reduces form filling and duplication, enabling seamless service integration.
- Impact: MAM reduces administrative burdens, enhances service integration, empowers individuals, activates support networks, and improves data quality.
- Mydex Approach: Mydex focuses on interoperability in today's world, working across various standards and using the Mydex Template System to configure and share data. The system supports data sharing, metadata, and multiple standards.
- Comparison with PRSB About Me: The document contrasts MAM with the PRSB About Me Standard, noting that while PRSB is primarily free text-based, MAM is structured for digital ecosystems and data sharing.
- Potential Questions and Answers: The document addresses questions about Mydex's support for open standards, its integration with clinical records, its use for research and AI, and how it compares to other models.
In essence, MAM is a structured, modular system within the Mydex Safe Secure Cloud that empowers individuals to control and share their personal information to improve service delivery and reduce administrative burdens.
Download overview as a pdf View overview as a pdfMaking Requests
A subscriber can request the entire contents of About Me using the PDX API in one go as a complete payload or request specific modules or subsections of a module. Subscribers can use the payload to map its contents into their back office applications used by their front line teams or their own People applications.
The payload is delivered in a structured JSON payload including field labels, values and validation rules which a subscriber can use to build their own experience layer in their own applications.
Subscribers with appropriate permissions defined in the Data Sharing Agreement (DSA) agreed with the individual for their Dedicated Connection (DC) to the individual's PDS via the PDX API. Subscribers can also deliver updates to one or more values contained within About Me, Modules, Subsection or specific fields subject to the validation rules within the PDS Master Data Schema.
The live routes that make up this Feature Block are hosted here: https://api.mydex.org/api/pds/. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api.mydex.org/api/pds/mam/this-is-me/personal-details/
...and with credentials...
https://api.mydex.org/api/pds/mam/this-is-me/personal-details/?uid=3919&con_id=3919-6789
For requests in the sandbox environment, please replace the above path with https://sbx-api.mydex.org/api/pds…
Routes Functionality
The routes/endpoints available for "About Me" are detailed in the table below.
They all come in the format {host}/{template}/{module}/{subsection} where
"template" is "mam" (aka "Modular About Me").
Each route is available as a GET (to get the data along with the PDS inputs), and a PUT (to update the PDS inputs) as follows.
GET
When you request a subsection, you will get a JSON object response that contains data about how that subsection is structured, along with the input values for each input field.
The response data from a GET request can be used to build your UI by using the labels and input values to build a form and populate its inputs.
For more examples of what you get in the response of a GET request, please see the section containing response examples.
Anatomy of the response
The JSON object contains the following elements:
-
The heading of the Module
-
A list of menu items - each item contains a url
link for each of the subsections within the same module indexed by its
relative heading
-
breadcrumbs - each item contains a heading and a
url link for each of the subsections within the same module
- The main content for the subsection requested
It looks a bit like this:
{
"heading": "This Is Me",
"menu_items": {},
"breadcrumbs": {},
"main_content": {}
}
Anatomy of the main_content
-
The heading of this subsection
- An array of input fields
It looks a bit like this:
{
"heading": "Personal Details",
"input_fields": {}
}
Anatomy of the input fields / question-answers
Each element in the input fields array represents a question/answer pair and is structured as follows:
-
Each is indexed by the question_id. This is
required when making a request to update the input values.
-
The type value tells us how the question should
function in the UI.
-
The label is the label that should appear in the
UI. The way the question is phrased. There are options here for a
person-centered value "citizen" or a more formal wording that might
be used in the context of a service provider app "service-provider".
-
The validation_rules is an array containing
validation codes which can be used to determine how the answer/value
submitted in a PUT should be formatted.
- The input - the answer/value that is stored in the person’s PDS.
It looks something like:
"also_known_as": {
"type": "input-text",
"label": {
"citizen": "How else am I known",
"service_provider": "Also known as (AKA)"
},
"validation_rules": [
"is_text"
],
"input": "Bobbi"
}
Please click on the tabs below for more detail about each element of a single input field:
Each element in the input_fields array is indexed by its own unique question_id. The question_id is in the form of a ‘machine name’, such as more_about_my_goals. This id should be stored so that it can be used upon submitting the form. You can see more about PUT requests in the relevant section (please navigate using the tabs above). Each citizen input must be indexed by the relevant question_id in the PUT request for submitting the form.
The type element contains a code that is indicative of the type of UI element expected, and in some cases it may also describe something about the functionality associated with the element.
See the table of existing codes and their meaning here: Type codes
Each question contains a label which is formed of two elements. The label with name “citizen” is worded in a suitably person-centered way, and the label with name “service_provider” is more suitable if being used in the context of an organisation.
The validation rules element contains one or more validation codes that describe how an answer should be submitted in a PUT request. See the table linked here for a list of validation codes and their meaning: Validation rules
The answers stored in a person’s PDS are mapped to the question_id. They appear here indexed by input.
There are some features of a single input field entity that are not present every time. These are outlined below:
“options”
This is included in question types such as input-select and check-buttons-multi - anywhere where the input value must come from a set of predefined values. Type input-select requires a citizen to select one value from a list of options, whereas check-buttons-multi requires a citizen to select one or more values from a list of values. The options array contains a list of options that can be selected from - in the case of input-select, one value is submitted, and in the case of check-buttons-multi an array of options is submitted.
Nested forms
Nested forms are included where a question is of a type consistent with being a nested component. For more about nested components, see the section on nested components by clicking on the relevant tab HERE.
Each time one of these types of questions appears, it will include a form for managing the relevant records via their own routes. For example “my-health-conditions” will come with a form “add_health_condition”, “gallery_uploader” will come with a form “add_image” and so on.
It will look something like this:
"add_image": {
"file": {
"type": "image",
"label": {
"citizen": "File",
"service-provider": "File"
},
"validation_rules": [
"base64_encoded",
"max_10_mb"
]
},
"file_name": {
"type": "input-text",
"label": {
"citizen": "File name",
"service-provider": "File name"
},
"validation_rules": [
"is_text"
]
},
"description": {
"type": "input-text",
"label": {
"citizen": "Description",
"service-provider": "Description"
},
"validation_rules": [
"is_text"
]
}
}
“required=true”
You may see this element in some of the nested forms. This means that the relevant PDS record must have a value for this field. In other words, when adding or updating a nested component record:
-
On a POST request, a value for this field must be present
- On a PUT request, the value must not be removed, it can only be updated or stay the same.
PUT
Anatomy of the request payload
When updating the input field data for a given subsection, you must include the data you want to update in the body of the request. At its most basic, the body is formed of an array of values indexed by the ‘question_id’ that each input value relates to. For example:
{
"what_do_i_like_socially_environmentally" : ["Big groups"],
"positive_qualities" : "happy",
"challenging_about_me" : "impatient",
"good_day_looks_like" : "Seeing family and friends",
"bad_day_looks_like" : "having nothing to do",
"area_of_my_goals" : ["Healthy eating", "Relaxation"],
"like_to_get_back_to" : "studying",
"achieve_in_future" : "visit my daughter in spain",
"more_about_my_goals" : "I would like to get better at spanish so that I can understand my grandchildren better"
}
The question_ids that you can see as indexes in that example match the question_ids you will get in the GET response, as described in the section on GET.
The validation rule in the form data tells us how an answer should be formatted. See the following section on validation rules for more information.
Validation rules
The table linked here describes the validation rules mapped to their codes. You will see these codes in the input fields within a subsection templates data structure.
Available Routes
Note: The following routes are available using either GET or PUT methods (see above for more on routes functionality).
| Module | Subsection | Endpoint |
|---|---|---|
| this-is-me | personal-details | https://api.mydex.org/api/pds/mam/this-is-me/personal-details |
| contact-details | https://api.mydex.org/api/pds/mam/this-is-me/contact-details | |
| current-support | https://api.mydex.org/api/pds/mam/this-is-me/current-support | |
| personal-qualities | https://api.mydex.org/api/pds/mam/this-is-me/personal-qualities | |
| my-people | https://api.mydex.org/api/pds/mam/this-is-me/my-people | |
| my-pastimes | https://api.mydex.org/api/pds/mam/this-is-me/my-pastimes | |
| my-home | https://api.mydex.org/api/pds/mam/this-is-me/my-home | |
| my-routines | https://api.mydex.org/api/pds/mam/this-is-me/my-routines | |
| reminiscence-gallery | https://api.mydex.org/api/pds/mam/this-is-me/reminiscence-gallery | |
| money-matters | https://api.mydex.org/api/pds/mam/this-is-me/money-matters | |
| key-info | medical-details | https://api.mydex.org/api/pds/mam/key-info/medical-details |
| my-medications | https://api.mydex.org/api/pds/mam/key-info/my-medications | |
| main-support | https://api.mydex.org/api/pds/mam/key-info/main-support | |
| access | https://api.mydex.org/api/pds/mam/key-info/access | |
| my-priorities | https://api.mydex.org/api/pds/mam/key-info/my-priorities | |
| support-package | https://api.mydex.org/api/pds/mam/key-info/support-package | |
| my-preferences | https://api.mydex.org/api/pds/mam/key-info/my-preferences | |
| health-wellbeing | medical-history | https://api.mydex.org/api/pds/mam/health-wellbeing/medical-history |
| wellbeing | https://api.mydex.org/api/pds/mam/health-wellbeing/wellbeing | |
| memory | https://api.mydex.org/api/pds/mam/health-wellbeing/memory | |
| staying-safe | https://api.mydex.org/api/pds/mam/health-wellbeing/staying-safe | |
| important | https://api.mydex.org/api/pds/mam/health-wellbeing/important | |
| money-matters | https://api.mydex.org/api/pds/mam/health-wellbeing/money-matters | |
| my-support | communication | https://api.mydex.org/api/pds/mam/my-support/communication |
| medications | https://api.mydex.org/api/pds/mam/my-support/medications | |
| general-fitness | https://api.mydex.org/api/pds/mam/my-support/general-fitness | |
| practical-help | https://api.mydex.org/api/pds/mam/my-support/practical-help | |
| moving-around-inside | https://api.mydex.org/api/pds/mam/my-support/moving-around-inside | |
| moving-around-outside | https://api.mydex.org/api/pds/mam/my-support/moving-around-outside | |
| getting-washed | https://api.mydex.org/api/pds/mam/my-support/getting-washed | |
| foot-care | https://api.mydex.org/api/pds/mam/my-support/foot-care | |
| personal-aids | https://api.mydex.org/api/pds/mam/my-support/personal-aids | |
| continence | https://api.mydex.org/api/pds/mam/my-support/continence | |
| eating-drinking | https://api.mydex.org/api/pds/mam/my-support/eating-drinking | |
| bedtime | https://api.mydex.org/api/pds/mam/my-support/bedtime | |
| falls | https://api.mydex.org/api/pds/mam/my-support/falls | |
| digital | https://api.mydex.org/api/pds/mam/my-support/digital | |
| support-package | https://api.mydex.org/api/pds/mam/my-support/support-package | |
| action-list | https://api.mydex.org/api/pds/mam/my-support/action-list | |
| my-supporting-roles | personal-details | https://api.mydex.org/api/pds/mam/my-supporting-roles/personal-details |
| people-i-care-for | https://api.mydex.org/api/pds/mam/my-supporting-roles/people-i-care-for | |
| my-caring-role | https://api.mydex.org/api/pds/mam/my-supporting-roles/my-caring-role | |
| impact-on-my-health | https://api.mydex.org/api/pds/mam/my-supporting-roles/impact-on-my-health | |
| emotional-wellbeing | https://api.mydex.org/api/pds/mam/my-supporting-roles/emotional-wellbeing | |
| impact-on-my-finances | https://api.mydex.org/api/pds/mam/my-supporting-roles/impact-on-my-finances | |
| my-life-balance | https://api.mydex.org/api/pds/mam/my-supporting-roles/my-life-balance | |
| impact-on-future-plans | https://api.mydex.org/api/pds/mam/my-supporting-roles/impact-on-future-plans | |
| impact-on-employment | https://api.mydex.org/api/pds/mam/my-supporting-roles/impact-on-employment | |
| impact-on-my-home | https://api.mydex.org/api/pds/mam/my-supporting-roles/impact-on-my-home | |
| other-aspects-of-life | https://api.mydex.org/api/pds/mam/my-supporting-roles/other-aspects-of-life | |
| skills-experience | https://api.mydex.org/api/pds/mam/my-supporting-roles/skills-experience | |
| what-matters | https://api.mydex.org/api/pds/mam/my-supporting-roles/what-matters | |
| planning-ahead | attitude-to-change | https://api.mydex.org/api/pds/mam/planning-ahead/attitude-to-change |
| power-of-attorney | https://api.mydex.org/api/pds/mam/planning-ahead/power-of-attorney | |
| anticipatory-care-plan | https://api.mydex.org/api/pds/mam/planning-ahead/anticipatory-care-plan | |
| will | https://api.mydex.org/api/pds/mam/planning-ahead/will | |
| unpaid-carer | https://api.mydex.org/api/pds/mam/planning-ahead/unpaid-carer | |
| advanced-directives | https://api.mydex.org/api/pds/mam/planning-ahead/advanced-directives |
"About Me" is an example of the "Mydex Template System", for more information about that please visit: Templates technical documentation
Calendar
Alpha
Overview
The calendar functionality enables subscribers to send invites to their service users from within their own applications and get responses to such invites sent or changes in status. Delivering these invites via secure PDX API reduces the time and effort for service users in manually processing those invites which may have been sent previously via post, SMS, email or traditional electronic calendar. Any events in your calendar automatically appear in an individual's Timeline.
Dependencies
Before getting started, it's important to know about any dependencies that may be required to use this particular feature block.
In the case of Calendar Events there are some instances where the context that the event exists in is required. For example, when creating an appointment, we need to know what the appointment relates to.
What contexts are we talking about?
(Click to expand)
Referrals
Currently, if you are working with the /calendar/add-appointment route, you will also need access to the Referrals Feature Block, which you can find out about HERE. An appointment exists in the context of a referral, so we need to link the appointment to the referral by storing the referral id along with the appointment.
Making Requests
The live routes that make up this Feature Block are hosted here: https://api.mydex.org. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api.mydex.org/calendar/get-events
...and with credentials...
https://api.mydex.org/calendar/get-events?uid=3919&con_id=3919-67898
For requests in the sandbox environment, please replace the above path with https://sbx-api.mydex.org/api/pds…
Routes
The following routes are available for managing calendar events (click to expand):
GET: /calendar/get-events
A request to this route will return all calendar events.
The following is an example payload of what you should expect to be returned on a GET all events request:
Example payload
{
"success": 1,
"events": [
{
"id": "70",
"instance": "0",
"source": "3939-40104",
"created_timestamp": "1759838783",
"updated_timestamp": "1759838783",
"external_uid": "45",
"title": "Hot stone Massage",
"description": "",
"start_timestamp": "1759818600",
"end_timestamp": "1759908600",
"organiser": "Ember Stone Wellness",
"attendee": "Sophie Marlowe",
"status": "INVITED",
"location": "Ember Stone Wellness",
"type": "Appointment",
"tags": null,
"trigger": null,
"action": null,
"reminder_description": null,
"context_name": "Ember Stone Wellness"
},
{
"id": "76",
"instance": "0",
"source": "3939-40104",
"created_timestamp": "1761732677",
"updated_timestamp": "1761732677",
"external_uid": "",
"title": "Oakwhistle village coffee morning",
"description": "Coffee morning with my neighbours",
"start_timestamp": "1762155000",
"end_timestamp": "1762158600",
"organiser": "Oakwhistle community members",
"attendee": "",
"status": "TENTATIVE",
"location": "Oakwhistle community hall",
"type": "",
"tags": null,
"trigger": null,
"action": null,
"reminder_description": null
}
]
}
Reading the results
Events are returned in ascending order by start_timestamp
i.e. the time the event is due to start.
Active fields that may have been written to on a POST/PUT request:
-
external_uid, this links the event to the context that it was created in. For example this will store the value submitted ascontext_idon a POST Appointment request. title, the title given to the event e.g. "Oakwhistle village coffee morning"description, the description of the eventstart_timestamp, the time the event starts, stored as a unix timestampend_timestamp, the time the event ends, stored as a unix timestamporganiser, who organised the eventattendee, who is attending the eventstatus, the status of the event e.g. "TENTATIVE"location, where is the event happeningtype, what type of event is this e.g. "Appointment"
Fields that are auto-populated on a POST/PUT request (as appropriate):
id, autoincremented identifier of the recordinstance, the instance of the recordsource, the connection data for the connection that the record was created withincreated_timestamp/updated_timestamp, when the record was created/updatedcontext_name, not always present in the payload, however this is the name of the organisation that the event relates to
Inactive fields that are "coming soon":
tagstriggeractionreminder_description
GET: /calendar/get-appointments
A request to this route will return all appointments for a given context.
An Appointment must exist within a certain context e.g. a Referral. So for example, let's say a person has been referred to a service, any appointments made in the context of that referral will be linked to it by the id of that referral.
To get appointments linked to a given context e.g. linked to a Referral this route requires to know the context that it was created within, along with the specific instance of that context.
Current valid contexts are as follows:
-
referral— for Referral Management, visit the Referrals Feature Block documentation here.
The request must include query parameters:
context, the context that the appointment exists within.context_id, the specific instance of that context that the appointment relates to.
The following is an example payload of what you should expect to be returned on a GET appointments request:
Example payload
{
"success": 1,
"appointments": [
{
"id": "56",
"instance": "0",
"source": "3939-40102",
"created_timestamp": "1758120493",
"updated_timestamp": "1758120493",
"external_uid": "63",
"title": "Occupational Health Initial Appointment",
"description": "One-on-one chat to discuss expectations and plan our time together",
"start_timestamp": "1754289000",
"end_timestamp": "1754292600",
"organiser": "Evan Harper",
"attendee": null,
"status": "INVITED",
"location": "SafeSteps Occupational Care",
"type": "Appointment",
"tags": null,
"trigger": null,
"action": null,
"reminder_description": null
}
]
}
Reading the results
Events are returned in ascending order by start_timestamp
i.e. the time the event is due to start.
Active fields that may have been written to on a POST/PUT request:
-
external_uid, this links the event to the context that it was created in. For example this will store the value submitted ascontext_idon a POST Appointment request. title, the title given to the event e.g. "Oakwhistle village coffee morning"description, the description of the eventstart_timestamp, the time the event starts, stored as a unix timestampend_timestamp, the time the event ends, stored as a unix timestamporganiser, who organised the eventattendee, who is attending the eventstatus, the status of the event e.g. "TENTATIVE"location, where is the event happening
Fields that are auto-populated on a POST/PUT request (as appropriate):
id, autoincremented identifier of the recordinstance, the instance of the recordsource, the connection data for the connection that the record was created withincreated_timestamp/updated_timestamp, when the record was created/updatedtype, this will always default to "Appointment"
Inactive fields that are "coming soon":
tagstriggeractionreminder_description
POST: /calendar/add-event
This route enables adding generic calendar events, i.e., ones that are not linked to a specific context. The body of the request should contain the following field/values.
Required Fields
title— The title of the appointment, e.g., “Initial meeting”.start_timestamp— The time the appointment starts as a Unix timestamp.end_timestamp— The time the appointment ends as a Unix timestamp.status— The status of the appointment, e.g., “INVITED”. If no value is passed in the request, this will default toTENTATIVE.
Optional Fields
description— A description of the appointment, e.g., “Meeting to discuss expectations”.organiser— The person/entity that created the appointment/event.attendee— Who the appointment is with, e.g., “Ellen Sykes”.location— Where the appointment/event will take place.type— The type of event, e.g., “Appointment”.
Example Request Body
{
"title": "Lunch with Ellen",
"start_timestamp": "1754289000",
"end_timestamp": "1754292600"
}
POST: /calendar/add-appointment
An appointment can be created within a given context, e.g., a referral. When making a request to add an appointment, the body of the request should contain the following field/values.
Required Fields
title— The title of the appointment, e.g., “Initial meeting”.start_timestamp— The time the appointment starts as a Unix timestamp.end_timestamp— The time the appointment ends as a Unix timestamp.status— The status of the appointment, e.g., “INVITED”.context— The context within which the appointment has been made, e.g., “referral”.context_id— The specific ID for the given context that the appointment relates to, e.g., 5.
Optional Fields
description— A description of the appointment, e.g., “Meeting to discuss expectations”.organiser— The person/entity that created the appointment/event.attendee— Who the appointment is with, e.g., “Emma White, Physiotherapist”.location— Where the appointment/event will take place.
Example Request Body
In this example, the PDS owner has been referred to a service and the referral has ID 8.
The service provider then invites the PDS owner to attend an appointment “Initial meeting with Physio”.
Submitting the context referral and context_id 8 links the appointment to this specific referral.
This means that all appointments relating to this specific referral can be grouped together.
{
"context": "referral",
"context_id": 8,
"title": "Initial meeting with Physio",
"start_timestamp": "1754289000",
"end_timestamp": "1754292600",
"status": "INVITED"
}
PUT: /calendar/update-event
Any event can be updated via this route by passing the ID of the event to update along with the data to update in the body of the request. The ID must be for an existing event. The body of the request should contain the following field/values.
Required Fields
id— The ID of the event to update.
Optional Fields
At least one of the following optional fields should also be submitted:
title— The title of the appointment, e.g., “Initial meeting”.start_timestamp— The time the appointment starts as a Unix timestamp.end_timestamp— The time the appointment ends as a Unix timestamp.status— The status of the appointment, e.g., “INVITED”. If no value is passed in the request, this will default toTENTATIVE.description— A description of the appointment, e.g., “Meeting to discuss expectations”.organiser— The person/entity that created the appointment/event.attendee— Who the appointment is with, e.g., “Ellen Sykes”.location— Where the appointment/event will take place.type— The type of event, e.g., “Appointment”.
DELETE: /calendar/delete-event
Use this route to delete an event by passing the id in the body of the request. The id must be for an existing event record.
Validations
Currently supported types of calendar event are:
- Generic event
- Appointment
The following table describes the validation for all field/values associated with making requests to these routes.
| Field / Query Parameter | Validation | Default Value |
|---|---|---|
id |
Must be numeric | n/a |
title |
Must be a non-empty text value | n/a |
start_timestamp |
Must be a Unix timestamp | n/a |
end_timestamp |
Must be a Unix timestamp | n/a |
status |
One of the following values:
|
Will default to TENTATIVE on a POST /add-event request |
type |
One of the following values: Appointment |
n/a |
context |
Must be a valid context value, e.g., “referral” | n/a |
context_id |
Must be numeric; an ID that links to an existing record in the specified context, e.g., a valid referral ID | n/a |
description |
Must be a text value | n/a |
organiser |
Must be a text value | n/a |
attendee |
Must be a text value | n/a |
location |
Must be a text value | n/a |
Timeline
Alpha
Overview
Timeline is designed to enable People to see their journey over time by bring together all activities stored within their personal data store, calendar events, secure messages, referrals and so on.
Dependencies
Before getting started, it's important to know about any dependencies that may be required to use this particular feature block.
Timeline doesn't have any dependencies as such, however by its nature, it brings together data that is available via other Feature Blocks.
Current Feature Blocks that are curated as part of Timeline
(click links to respective documentation)
Making Requests
The live routes that make up this Feature Block are hosted here: https://api.mydex.org. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api.mydex.org/timeline
...and with credentials...
https://api.mydex.org/timeline?uid=3919&con_id=3919-67898
For requests in the sandbox environment, please replace the above path with https://sbx-api.mydex.org/api/pds…
Routes
The following routes are available for managing timeline (click to expand):
GET: /timeline
This route retrieves all timeline items. The timeline is arranged in ascending order by item_timestamp. The data
returned for each record is a brief containing only headline information. A full record for each item can be requested using
the /timeline/single-item endpoint.
Example response:
{
"success": 1,
"timeline": [
{
"id": 2,
"feature_block": "referrals",
"feature_block_id": "32",
"start_timestamp": "14th January 2022, 9:30 am",
"item_timestamp": "1642137822",
"service_description": "Assistance with job placement and CV review",
"service_name": "Employment Support Program",
"contact_name": "John Smith",
"contact_title": "Career Advisor",
"memo": "Client requires additional guidance for CV formatting and interview prep",
"status": "Accepted"
},
{
"id": 3,
"feature_block": "secure_messages",
"feature_block_id": "1",
"start_timestamp": "8th July 2025, 3:12 pm",
"item_timestamp": "1751987551",
"created_timestamp": "1751987551",
"message_from": "",
"message_to": "Daniel Johnson",
"message_content": "Hello, how are you?"
},
{
"id": 4,
"feature_block": "calendar",
"feature_block_id": "82",
"start_timestamp": "4th August 2025, 7:30 pm",
"item_timestamp": "1754289000",
"end_timestamp": "4th August 2025, 10:30 pm",
"title": "Landless gig",
"location": "Usher Hall",
"organiser": "",
"description": "Landless gig with Ellen",
"status": "TENTATIVE",
"duration_string": "3 hours",
"duration_of_event": 0.125
}
]
}
Reading the results
Each timeline item returned is a brief of the data for that given item. Currently, three different types of timeline items are returned, but some fields are common to each:
-
id, the timeline ID -
feature_block, the feature block that this item belongs to, e.g., "referrals" -
feature_block_id, the ID of this item as it pertains to its feature block -
start_timestamp, when the item is initiated as a human-readable value. The meaning of this will differ according to the type of data record:- "referrals": the time the referral was made
- "secure_messages": the time the message was sent or received
- "calendar": the time the event is due to start
-
item_timestamp, the Unix timestamp version ofstart_timestamp
Additional fields vary depending on which feature block the item pertains to:
-
"referrals"
service_description: description of the service the referral relates toservice_name: name of the service the referral relates tocontact_name: name of the contact for this referralcontact_title: title of the contact for this referralmemo: any notes relating to this referralstatus: status of the referral, e.g., "Accepted"
-
"secure_messages"
created_timestamp: time the message was sent/received as a Unix timestampmessage_from: who the message is from (empty if this is a sent message)message_to: who the message is to (empty if this is a received message)message_content: the content of the message, i.e., what the message says
-
"calendar"
end_timestamp: the time the event is due to end as a Unix timestamptitle: the title of the eventlocation: where the event is locatedorganiser: who organised the eventdescription: a description of the eventstatus: the status of the event, e.g., "TENTATIVE"duration_string: how long the event lasts as a human-readable string, e.g., "3 days"duration_of_event: the calculable duration of the event in terms of days, i.e., how many days long the event is
GET: /timeline/single-item
This route supports requests for a single timeline item. In order to make a successful request to this route the following query parameters must be included:
feature_block, tells us which feature block the item belongs tofeature_block_id, tells us the specific id for that item as it pertains to its feature block
Upon requesting a single item from the timeline, a full record will be returned that often includes additional data points to those returned on a GET /timeline request.
Example response:
In this example, a request has been made as follows:
https://api.mydex.org/timeline/single-item?uid=3919&con_id=3919-67898&feature_block=secure_messages&feature_block_id=96
{
"success": 1,
"timeline_item": {
"feature_block": "secure_messages",
"feature_block_id": "96",
"start_timestamp": "17th July 2025, 12:19 pm",
"item_timestamp": "1752754774",
"created_timestamp": "1752754774",
"updated_timestamp": "1752754774",
"conversation_id": "referral-0",
"time_sent": "1752754774",
"time_received": "",
"message_from": "",
"message_to": "Marco's Org",
"message_content": "Hi there"
}
}
Validations
The following table describes the validation for all field/values associated with making requests to these routes.
| Field / Query Parameter | Validation | Default Value |
|---|---|---|
feature_block |
Must be one of the following: "referrals", "secure_messages", "calendar" | n/a |
feature_block_id |
Must be a numeric string representing a whole number | n/a |
Directory Services
Alpha
Overview
The Self Managed Directory Service is hosted on the MRD Content Services API.
SMDS also functions as a Feature Block that enables Service Providers and their applications to link up services published here with the SSC PDX API Referrals Feature Block to enable seamless self-referral services to their citizen service users.
MRD Content Service Subscribers can embed SMDS in their own experience layer (e.g., public website, or citizen web or native app) and enable their citizen service users to trigger self-directed referrals seamlessly.
SMDS enables service providers to get into the core of the Safe Secure Cloud and join up services between themselves and citizens, benefiting from service integration capabilities through linking each service’s referrals through onboarding, operational delivery, and offboarding.
Subscribers’ SMDS Manager can do any of the following:
- Add, update, and remove services from their services hosted on the Mydex Service Directory.
- Publish these services so they are visible and available to people and other service providers to aid in self-directed support.
- Enable referrals from one service provider to another via the individual.
- Signpost a service to an individual as part of a secure message.
- Provide signposting in an Action List or support plan created by a Service Provider for a Member as part of ongoing support and monitoring.
The Mydex Self Managed Directory Service can work alongside other hosted directories such as ALISS , also hosted on MRD.
The Mydex Self Managed Directory Service can support new categories of content in the directory such as events of various kinds (with attending venue information), product information (e.g., adaptations), and specific products to support particular health conditions and needs.
Mydex Members can view and interact with the Self Managed Directory Service from within the Mydex People App as well as third-party applications provided to Subscriber organisations by commercial developers, open-source software, or crown copyright application software.
Making Requests
The live routes that make up this Feature Block are hosted here: https://api-mrd.mydex.org. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api-mrd.mydex.org/service-directory/people/1
Routes
The following routes are available for managing the Service Directory (click to expand):
GET: /service-directory/people/{org-id}
To use this route you will need to pass a value for the org-id, the id allocated to your organisation.
For example, if your organisation ID is ‘1’ - this is the ID to use in the MRD Endpoint, like so:
https://api-mrd.mydex.org/service-directory/people/1
The resulting payload should look something like this:
[
{
"id": "35",
"organisation_id": "1",
"service_id": "10",
"service_name": "Support Plan Service",
"service_email": "test2@gmail.com",
"service_url": "https:\/\/carers.quarriers.org.uk\/services\/moray\/",
"service_description": "Sign up here to get in touch with our team. They will help you create a support plan and look at what resources may be available to you. To get the most out of this, please complete the This is Me and My Supporting Role sections of your About Me.",
"service_contact_number": "0771234567",
"service_slug": "support-plan-service",
"status": "Live",
"service_start": "1725408000",
"service_end": "1851638400",
"created_timestamp": "1725437887",
"updated_timestamp": "1725437915"
}
]
The example above represents the ‘Live’ services from organisation with ID 1.
Referrals
Beta
Overview
Referrals are the heart of service delivery and engagement and safe and secure engagement between people and their network of service providers. It is how connections between service providers and people are made. Service providers can use referrals to make referrals to another service provider or provide signposting to services that an individual may want to consider so they can self refer.
Referrals coupled with the Service Directory are the heart of Self Directed Support and a means to deliver Social Prescribing or more formal referrals to other service providers as part of an integrated service journey across departments and a network of service providers.
Referrals are delivered seamlessly without the need for forms, letters, emails or SMS messages. Any service provider receiving a referral can immediately access the relevant information relating to the person referred including the specific service or services referred to them. This is particularly important for the necessary information needed to assess and onboard an individual into their service.
Service Providers can review referrals and either accept them or reject them and assign them to a member of their front line team. Acceptance of a referral is automatically notified to the person being referred. Calendar invites can be linked seamlessly to the referral, and any related secure messages sent back and forth are retained in the context of the referral.
Dependencies
Before getting started, it's important to know about any dependencies that may be required to use this particular feature block.
In the case of Referrals there are some instances where the service that the referral relates to is required. For example, when making a self-referral, we need to know to which service.
For that reason, anywhere where a service_id is required, access to the Directory Services Feature Block
will be needed. Find out more about Directory Services
HERE.
Making Requests
The live routes that make up this Feature Block are hosted here: https://api.mydex.org. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api.mydex.org/referrals/self-refer
...and with credentials...
https://api.mydex.org/referrals/self-refer?uid=3919&con_id=3919-67898
For requests in the sandbox environment, please replace the above path with https://sbx-api.mydex.org/api/pds…
Routes
The following routes are available for managing referrals (click to expand):
GET: /referrals/read-all
A request to this route will return all referrals.
The following is an example payload of what you should expect to be returned on a GET all referrals request:
Example payload
{
"success": 1,
"referrals": [
{
"id": "87",
"created_timestamp": "1760439590",
"service_id": "0",
"service_name": "Community Wellness & Support Services",
"service_description": "Provides emotional support, resource navigation, and guidance for individuals or families seeking help with stress, life challenges, or overall well-being.",
"service_contact_number": "01620 482117",
"service_email": "support@communitywellness.org",
"service_url": "https://www.communitywellness.org",
"type": "Self Referred",
"status": "Referred"
},
{
"id": "88",
"created_timestamp": "1761124272",
"service_id": "5",
"service_name": "Integrated Mental Health Outreach",
"service_description": "Offers accessible mental health support—such as counselling, check-ins, and referrals—aimed at reaching people in the community who may need early or ongoing assistance.",
"service_contact_number": "01620 739660",
"service_email": "contact@imhoutreach.org",
"service_url": "https://www.imhoutreach.org",
"type": "Self Referred",
"status": "Accepted"
},
{
"id": "89",
"created_timestamp": "1761124823",
"service_id": "5",
"service_name": "Personal Growth & Counselling Center",
"service_description": "A therapeutic service focused on helping individuals work through personal struggles, build coping skills, and foster long-term emotional and psychological growth.",
"service_contact_number": "01620 214893",
"service_email": "info@pgcounselingcenter.com",
"service_url": "https://www.pgcounselingcenter.com",
"type": "Self Referred",
"status": "Referred"
}
]
}
Reading the results
Each referral returned contains data about the service the referral relates to:
-
service_id -
service_name -
service_description -
service_contact_number -
service_email -
service_url
As well as the specifics of the referral itself:
-
idunique identifier for this referral -
created_timestampthe time the referral was created as a unix timestamp -
typethe type of referral e.g. "Self Referred" -
statusthe status of the referral e.g. "Rejected"
GET: /referrals/read-per-service
A request to this route will return all referrals for a given service.
Pass the service_id as a query parameter to specify which service the referrals belong to.
The following is an example payload of what you should expect to be returned on a GET referrals per service request:
Example payload
{
"success": 1,
"referrals_per_service": {
"10": {
"service_id": 10,
"referrals": [
{
"id": "54",
"created_timestamp": "1756376399",
"updated_timestamp": "1756376399",
"type": "Self Referred",
"status": "Accepted"
},
{
"id": "64",
"created_timestamp": "1759316193",
"updated_timestamp": "1759316193",
"type": "Self Referred",
"status": "Referred"
},
{
"id": "65",
"created_timestamp": "1759316233",
"updated_timestamp": "1759316233",
"type": "Self Referred",
"status": "Accepted"
}
]
}
}
}
Reading the results
In this case we already know what service we are requesting referrals for and so we only need to return the data specific to the referral itself:
-
idunique identifier for this referral -
created_timestampthe time the referral was created as a unix timestamp -
updated_timestampthe time the referral was updated as a unix timestamp -
typethe type of referral e.g. "Self Referred" -
statusthe status of the referral e.g. "Rejected"
GET: /referrals/read-single
A request to this route will return a single referral.
Pass the id as a query parameter to specify which referral to return.
The following is an example payload of what you should expect to be returned on a GET single referral request:
Example payload
{
"success": 1,
"referral": {
"id": "96",
"created_timestamp": "1764260644",
"service_id": "2",
"type": "Self Referred",
"status": "Referred",
"memo": "Support needed for emotional regulation, coping strategies, and guidance with personal and social challenges."
}
}
Reading the results
Here we are getting the specifics for an individual referral scoped to include a bit more detail i.e. to include notes/memo data:
-
idunique identifier for this referral -
created_timestampthe time the referral was created as a unix timestamp -
typethe type of referral e.g. "Self Referred" -
statusthe status of the referral e.g. "Rejected" -
memoany notes related to this referral such as a description of why the referral has been made
POST: /referrals/self-refer
Use this route for self-referrals. This route adds a referral to a service for a specified PDS. In the body of the request, pass the following fields to create a referral.
Required Fields
-
service_id— The ID of the service that the referral is to.
Fields
referree_background— Background of the referred person in the context of this referral.referree_requirements— Requirements of the referred person for this referral.referree_availability— Date/times the referred person is available to attend this service.referrer_name— Name of who made the referral.service_name— Name of the service.service_description— Description of the service.service_url— Service URL.service_email— Service email address.contact_number— Contact number for the service.memo— Any notes related to the referral.start_time— The date/time the referral starts.
PUT: /referrals/update-status
Use this route for updating the status of a referral.
Required Fields
id— The ID of the referral to update.status— The status of the referral.
Optional Fields
None
Validations
The following table describes the validation for all field/values associated with making requests to these routes.
| Field / Query Parameter | Validation | Default Value |
|---|---|---|
id |
Must be a whole number | n/a |
service_id |
Must be numeric and link to a valid service | n/a |
referree_background |
Must be a text value | n/a |
referree_requirements |
Must be a text value | n/a |
referree_availability |
Must be formatted as an array like:
Where the content of the “AM”/“PM” array must be one or more of the following values:monday, tuesday, wednesday, thursday, friday
|
|
referrer_name |
Must be a text value | n/a |
service_name |
Must be a text value | n/a |
service_description |
Must be a text value | n/a |
service_url |
Must be a text value | n/a |
service_email |
Must be formatted as a valid email | n/a |
contact_number |
Must be a valid phone number | n/a |
memo |
Must be a text value | n/a |
status |
One of the following values:
/self-refer route, this will default to Referred.
|
Referred |
start_time |
Must be a Unix timestamp | n/a |
Secure Messaging
Alpha
Overview
Secure messaging occurs between a citizen and a subscriber by reading and writing citizen-owned PDS data.
To send a message to a citizen, the pdx-api has a POST route /secure-messages/receive
(the PDS is receiving the message); a citizen can send a message to a subscriber using the POST route
/secure-messages/send (the PDS is sending the message); to retrieve messages that form part
of a specific conversation, the GET route /secure-messages/conversation should be used.
It’s worth noting that a conversation exists in a given context, and is linked to that context by id.
So for example, a conversation can occur as part of a referral, a conversation that occurs as part of
that referral is linked by the referral id. Each message that is sent/received as part of that
conversation has a conversation_id that contains information about the context and the linked
id that the conversation relates to. This is formatted like {context}-{context-id}, so for a
conversation that is occurring as part of referral with id 44, the conversation_id would be
“referral-44”.
The current accepted contexts are as follows:
-
referral— for Referral Management, visit the Referrals Feature Block documentation here.
Dependencies
Before getting started, it's important to know about any dependencies that may be required to use this particular feature block.
In the case of Secure Messaging we need to know what context the messages exist in. For example, when sending/receiving a message, we need to know what conversation the message belongs to.
What contexts are we talking about?
(Click to expand)
Referrals
Currently, if you are working with any of the Secure Messaging routes, you will also need access to the Referrals Feature Block, which you can find out about HERE. A conversation exists in the context of a referral, so we need to link those messages to the referral by storing the referral id with each message that forms part of the conversation.
Making Requests
The live routes that make up this Feature Block are hosted here: https://api.mydex.org. The routes described below should be appended to this.
For more information about how to access these routes, please visit the dedicated document covering the implementation of OAuth 2.0
Example request:
https://api.mydex.org/secure-messages/receive
...and with credentials...
https://api.mydex.org/secure-messages/receive?uid=3919&con_id=3919-67898
For requests in the sandbox environment, please replace the above path with https://sbx-api.mydex.org/api/pds…
Routes
The following routes are available for managing secure messages (click to expand):
GET: /secure-messages/conversation
This route gets messages that form part of a specific conversation. Remember a conversation occurs as part of a given context which is described
by the conversation_id i.e. {context}-{context-id}. To request a conversation, the conversation_id, formatted as such,
is passed as a query parameter e.g. ?conversation_id=referral-44.
If no conversation exists in the given context, then an empty array will be returned, otherwise any messages will be returned ordered by the time they were created with the most recent appearing at the end of the array.
Example response:
[
{
"id": "343",
"conversation_id": "referral-44",
"message_to": "Jane",
"time_sent": "1757948121",
"message_content": "Hello",
"status": "sent"
},
{
"id": "344",
"conversation_id": "referral-44",
"message_from": "Andy",
"time_received": "1757948123",
"message_content": "Hello",
"status": "received"
},
{
"id": "345",
"conversation_id": "referral-44",
"message_from": "Andy",
"time_received": "1757948142",
"message_content": "How are you",
"status": "received"
},
{
"id": "346",
"conversation_id": "referral-44",
"message_to": "Jane",
"time_sent": "1757948144",
"message_content": "I'm good thanks",
"status": "sent"
}
]
Optional additional query parameters:
afterreturn messages after a given idbeforereturn messages before a given idlimitreturn a specified max number of results
Either before or after query parameters can be used with or without the limit parameter to affect pagination in a way that supports a typical messaging service experience.
Without the additional query parameters, a GET conversation request will return the most recent messages and will default to a limit of 20 i.e. the 20 most recent messages. To get older messages, a GET request can be made with the addition of the before query parameter and setting it to the oldest message id of the previous request/response. The default limit is 20; if a different limit is required, this value can be passed in the request (max limit is 100).
Example requests:
- GET
/secure-messages/conversation?conversation_id=referral-44&limit=8 - GET
/secure-messages/conversation?conversation_id=referral-44&before=343&limit=8 - GET
/secure-messages/conversation?conversation_id=referral-44&after=343
POST: /secure-messages/send
This route is used for sending a message from the PDS owner. It writes the message to the PDS and sets a value for
message_to to indicate who the message was sent to.
In the body of the request, the following fields are expected:
message_contentthe content of the messagemessage_towho the message is sent toconversation_idthe conversation id that links the messages to a specified context e.g. a referral
The following fields are written to by default: time_sent, calculated as the unix timestamp the send request is received.
Example request body:
{
"conversation_id": "referral-44",
"message_to" : "Andy Brown",
"message_content" : "Hello"
}
POST: /secure-messages/receive
This route is used for sending a message to the PDS owner. It writes the message to the PDS and sets a value
for message_from to indicate who the message was sent from.
In the body of the request, the following fields are expected:
message_contentthe content of the messagemessage_fromwho the message is sent fromconversation_idthe conversation id that links the messages to a specified context e.g. a referral
The following fields are written to by default: time_received, calculated as the unix timestamp the receive request is received.
Example request body:
{
"conversation_id": "referral-44",
"message_to" : "Rae Wilson",
"message_content" : "Hi there"
}
Validations
The following table describes the validation for all field/values associated with making requests to these routes.
| Field / Query Parameter | Validation | Default Value |
|---|---|---|
conversation_id |
Must be present in all requests. Formatted like {context}-{context-id} where context
is a valid context value e.g. “referral”, and context-id is a valid id that links to a record in the PDS e.g. a valid referral id.
|
n/a |
message_to |
Must be a non-empty text value | n/a |
message_from |
Must be a non-empty text value | n/a |
message_content |
Must be a non-empty text value | n/a |
before |
Must be numeric | n/a |
after |
Must be numeric | n/a |
limit |
Must be numeric and not more than 100 | 20 |
Measurements
Beta
Overview
People are increasingly keeping measurements about their life and themselves as a person. These are being collected by smart phones, smart watches and other forms of personal sensors.
This measurement data can be delivered directly to the Personal Data Store (PDS) using our Measurements Feature Block. Once stored in the PDS this data becomes available to the individual to use as they wish for their own purposes. Critically they can make this data available to as many subscribers as request it and they approve those use cases via a GDPR Datasharing Agreement.
Measurements add to the individual's life records creating a more holistic view by integrating it into the PDS and combining it with other related data e.g. location, service provider and a range of analysis and research purposes.
There are multiple use cases across operational health and social care delivery that can be greatly enhanced through seamless data integration to reduce the delays and complexity of administration.
Researchers and those evaluating projects and seeking citizen input to policy development for areas such as public health, transport and local services can subscribe to Measurements and access anonymised or pseudo anonymised records for multiple use cases in a fully GDPR compliant manner operating with the data ethics and consents of any project. These insights may be for a specific period in time or type through to continual longitudinal studies.
We have a roadmap for the Feature Block which we are prioritising based on demand to support specific use cases and processing requirements.
For more on measurements click these headings to expand:
Single value measurements
This is a dedicated Measurement Log for single value items. We currently support 29 different single value Measurements. An example is Weight which represents a given point in time capture of a specific value and is therefore available for tracking overtime. All single value measurements can be added via dedicated routes which are explained in the Developer Guidance below .
Multiple value measurements
These forms of measurement require multiple values to provide a complete record. They are as follows:
Oxygen Saturation Log – Blood oxygen level is recorded. It can also record methods of measurement, location, forms of administration, and the supplemental flow rate, which is the rate at which additional oxygen is supplied to a user in litres per minute. Set to zero if no supplemental oxygen is provided.
Blood Glucose Log – Blood glucose measurement including means of capturing blood glucose, cross-reference to the Nutrition Log including meal type. Can be added as a cross-reference to the specific record ID of the meal record.
Blood Pressure Log – Records blood pressure readings: the diastolic and systolic measurements in mmHg. In addition, the position of the individual during the reading and where the measurement was taken on the body.
Body Temperature Log – Body temperature, location on the body where temperature was taken, as well as the source device type.
Nutrition Log – A top-level record of nutrition— essentially meals and snacks—which can be categorised and tracked over time. This is supported by a detailed record of the meal consumed in the Nutrition Consumption Log that breaks down into a much more granular level, of great interest to dieticians and clinicians. Many food-logging apps provide easy meal and snack capture through lookups of products using barcodes from databases of products and food types. These generate the data payload for storage in the Nutrition Consumption Log.
Workout Log – The workout log stores exercises of many different types and the specific metadata about a workout including start and end times, repetitions, and resistance levels. Many wearables and apps capture this information, including—for example—specific events that gather step count, which can be classified as a type of exercise.
Cervical Mucus Log – Cervical mucus is a fluid produced by the cervix that changes in consistency throughout a woman's menstrual cycle. People track it to identify their most fertile window—when they are most likely to conceive—by observing these changes in texture and amount, which are influenced by hormone fluctuations. Many apps that track the menstrual cycle can record and generate this type of measurement data.
Cervical Position Log – Cervical position refers to the location and position of a woman's cervix within the vagina, which changes throughout her menstrual cycle. People track it primarily to identify their most fertile window by observing when the cervix is high, soft, and open, indicating ovulation is approaching. The same apps that monitor the menstrual cycle can gather this information in the same way.
Related datasets for measurements
As part of our roadmap, where source data contains additional metadata which can be provided in payloads, we will be able to apply this information as a linked record in relevant datasets for future retrieval as part of Measurement requests.
Location Data – Many measurement solutions can also access or make use of location data collected by the devices that are also collecting measurement data. Location data can be delivered in bulk independently of activity, but it can also be cross-referenced with measurement data.
Device Record – You can register the devices that are used to collect the measurement data so that measurements can be linked to specific devices. This has been considered valuable for comparative analysis between different consumer wearable devices and clinically certified wearable devices that may be prescribed by a health and care professional as part of a support service.
Coming in the future
Our SSC Roadmap for the Measurements Feature Block will be the provision of dedicated routes that support additional parameters and logic that will automatically manage the linking and interconnectivity with other Feature Blocks, and allow Third Party Integrators to more easily integrate, as all the rules in terms of PDS record management and linking will be managed by the PDX API.
Measurements will have its own OAuth scopes and be integrated into the Data Sharing and Services Agreement and Dedicated Connections as a Feature Block.
We are currently implementing Phase 1 of our Feature Block for Measurements (MESM) and have released Single Value Measurements and Blood Pressure Multi Value Measurements, supported by our MRD API Measurements Lookup service.
The following guidance is specifically for use of Beta dedicated routes and the MRD API Services supporting Measurements. This section provides guidance for third party integrators development teams on making successful PDX and MRD API requests.
Use of MRD Look up Tables for Measurements
In order to add a measurement via your experience layer, you will need to look up the relevant tables via the MRD API to ensure the data is validated correctly. The PDX API performs validation for any POST requests to add a new record to one or more Measurements in the Collection.
To make requests to the MRD API’s measurements endpoints, ensure you use an
OAuth2.0 access token scoped to ‘measurements’ and send the
X-Mrd-Scopes header with value ‘measurements’ as well, in
accordance with our MRD API authentication documentation.
For single value Measurements you can get a list of measurement types by
making a request to the measurement type MRD endpoint:
{{MRD_API_URL}}/measurements/types
This will return a list of all measurement type values which include the name (e.g., ‘Weight’) and the internal code for this measurement type (e.g., ’11’) as well as any other specific metadata related to that measurement type, such as the unit of measure.
For more complex multi-value measurements which need multiple lookups, such as Blood Pressure, you need to request the metadata for that Measurement type endpoint. For example, for Blood Pressure there are two relevant lookups:
- For ‘body_position’, make a request to
{{MRD_API_URL}}/measurements/body-position - For ‘measurement_location’, make a GET request to
{{MRD_API_URL}}/measurements/blood-pressure-measurement
This section explains how the use of MRD contributes to formatting the correct payload for making a POST request.
Managing Single Value Measurement Records (e.g. Weight)
For information on how to manage single-value measurement records please click to expand the relevant headings below:
Add a New Single Value Measurement (POST)
This use case is where you are recording a specific measurement, which we
will store in the PDS ds_measurements_log when you submit a
POST request via the dedicated Measurements Route. For a measurement like
‘Weight’, we only need a single row in ds_measurements_log
added via the Dedicated Measurements routes.
The MRD API has a number of measurement-related endpoints which are used as lookup values related to the relevant dedicated routes and the underlying dataset record to map specific lookup values relevant to a record. For example: measurement types, unit measurements, and measurement groups to be used as values in the PDS record fields.
Measurement type (id value) must map into the PDS ds_measurements_log.measurement_field_type.
This goes with measurement_type (varchar) which stores the type
of measurement, e.g., ‘Weight’. So measurement_field_type would
be a value like ’11’, which is the code for Weight in our measurement types
lookup table.
You can get a list of measurement types for single value measurements using
the MRD endpoint: {{MRD_API_URL}}/measurements/types
We currently support 29 different types of single Measurement values. You get the list via MRD Lookup, which also provides validations related to them.
This will return a list of all measurement type values which include the
name (e.g., ‘Weight’) and the internal code for this measurement type (e.g.,
’11’) as well as any other specific metadata related to that measurement,
such as the unit measure. When creating the new Measurement record in the PDS,
you will only need to supply the measurement_name value (e.g., ‘Weight’).
We will internally map the other fields to the log entry.
The returned measurement type list from the MRD API looks like this (shortened version of the complete list of 29 single value measurements):
[
{
"measurement_id": "1",
"measurement_name": "BMR",
"measurement_group": "Health",
"measurement_unit": "kcal per day"
},
{
"measurement_id": "2",
"measurement_name": "Calories Burned",
"measurement_group": "Activity",
"measurement_unit": "kcal"
}
]
You can then select the appropriate value for the type of measurement to
send in your POST Request for us to file in the PDS in the relevant dataset
(in this case, ds_measurement_log). For Weight, use ‘kgs’ in
the measurement_unit field. The value itself is stored in
measurement_value (e.g., ’75.8’).
Adding the measurement via the PDX API (POST)
Note: As with any other PDX API requests (like Templates), you should request an OAuth 2.0 Bearer token with the required scopes. The scopes required for single value measurements and Blood Pressure are:
get:/api/pds/view-measurements
put:/api/pds/update-measurements
post:/api/pds/add-measurements
get:/api/pds/view-blood-pressure
put:/api/pds/update-blood-pressure
post:/api/pds/add-blood-pressure
Adding a new Measurement entry for a single value measurement uses the PDX API
endpoint {{PDS_API_URL}}/api/pds/add-measurements. Just like with
Mydex templates (e.g., MAM), you must pass the Connection-Token
header as well as query parameters with uid and con_id.
A typical request looks like this:
curl --location 'https://api.mydex.org/api/pds/add-measurements?uid=4043&con_id=4043-40102' \
--header 'Connection-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data '[
{
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"measurement_type": "Weight",
"measurement_timestamp_start": 1648633780,
"measurement_timestamp_end": 1648633780,
"measurement_value": 175.8
}
]'
Here’s an example request body of a complete ‘Weight’ Measurement record:
[
{
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"measurement_type": "Weight",
"measurement_timestamp_start": 1648633780,
"measurement_timestamp_end": 1648633780,
"measurement_value": 75.8
}
]
The fields source_name and source_device_type are
free text fields; use these to store the source and device type. The
measurement_type field MUST be a value from the measurement types
MRD lookup table, otherwise validation will fail. The
measurement_value is a float, so ensure it’s valid (e.g., 75.0
for 75kg weight).
Batch Adding Multiple Rows
You can send more than one measurement record in a single POST request (up to 50 records) by adding additional elements to the request body array. For example, adding both ‘Weight’ and ‘Height’:
[
{
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"measurement_type": "Weight",
"measurement_timestamp_start": 1648633780,
"measurement_timestamp_end": 1648633780,
"measurement_value": 75.8
},
{
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"measurement_type": "Height",
"measurement_timestamp_start": 1648633790,
"measurement_timestamp_end": 1648633790,
"measurement_value": 180.5
}
]
When adding multiple entries, the last_insert_id in the response
will be an array with each element added:
{
"last_insert_id": [
"140",
"141"
]
}
Update an Existing Single Measurement Entry (PUT)
To mitigate errors, you can update a single
measurement_value after the record has been created. You cannot
change any other fields. Use the record’s id with the PUT
endpoint {{PDS_API_URL}}/api/pds/update-measurements:
{
"id": "2",
"measurement_value": 175.0
}
The response shows the updated record:
{
"updated_value": {
"id": "2",
"measurement_value": "175.0"
}
}
Retrieve Single Measurements Records (GET)
To get all single measurement records stored in the PDS, make a GET request to
{{PDS_API_URL}}/api/pds/view-measurements. Example response:
[
{
"id": "1",
"instance": "0",
"source": "4043-40102",
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"source_instance": "0",
"record_created_timestamp": "",
"record_updated_timestamp": "1744882148",
"measurement_group": "Body",
"measurement_type": "Weight",
"measurement_timestamp_start": "1648633780",
"measurement_timestamp_end": "1648633780",
"measurement_field_type": "11",
"measurement_unit": "kgs",
"measurement_value": "175.0"
}
]
Filtering GET Requests
You can filter requests to get specific measurement types (e.g., ‘Weight’ or
‘Height’). Additional filtering options (timestamps, device types, source
names) will be added in the future. Filter by passing the query parameter
measurement_field_type (from the MRD lookup value). For Weight,
use 11 to filter results.
Managing Blood Pressure Log records
For information on how to manage blood pressure log records please click on the relevant tabs below:
Add a Blood Pressure Log Entry (POST)
Adding Blood Pressure records is much the same as adding new single measurement records.
The differences are in the endpoint, payload, and MRD lookup values. You will need
the lookup ID values for body_position and measurement_location.
For body_position you can make a request to {{MRD_API_URL}}/measurements/body-position. The response will look like this:
[
{
"id": "1",
"body_position_id": "1",
"description": "Standing up"
},
{
"id": "2",
"body_position_id": "2",
"description": "Sitting down"
},
{
"id": "3",
"body_position_id": "3",
"description": "Lying down"
},
{
"id": "4",
"body_position_id": "4",
"description": "Reclining"
}
]
You will then use the id/body_position_id as the value in the POST request to the PDX API.
For measurement_location, you can make a GET request to {{MRD_API_URL}}/measurements/blood-pressure-measurement. The response looks like this:
[
{
"id": "1",
"blood_pressure_measurement_id": "1",
"description": "Left wrist"
},
{
"id": "2",
"blood_pressure_measurement_id": "2",
"description": "Right wrist"
},
{
"id": "3",
"blood_pressure_measurement_id": "3",
"description": "Left upper arm"
},
{
"id": "4",
"blood_pressure_measurement_id": "4",
"description": "Right upper arm"
}
]
Putting this together, if you are adding a blood pressure record where the body position was sitting down and the measurement location was right upper arm, you would use the values 2 and 4 respectively.
You can add a new row by making a POST request to {{PDS_API_URL}}/api/pds/add-blood-pressure.
The request body should look like this:
[
{
"blood_pressure_timestamp_end": "1648633780",
"blood_pressure_timestamp_start": "1648633780",
"body_position": "2",
"diastolic": 75.7,
"measurement_group": "Activity",
"measurement_location": "4",
"source_device_type": "Mobile",
"source_name": "Apple Health Kit",
"systolic": 120.7
}
]
As with single value measurements, systolic and diastolic should
be float values. source_name and source_device_type are used
in the same way as with other measurements.
Update a Blood Pressure Log Entry (PUT)
You can only update the values (systolic and diastolic).
Other fields cannot be changed. The updated timestamp will be updated automatically.
Specify the id of the record to update. The PUT endpoint is
{{PDS_API_URL}}/api/pds/update-blood-pressure. A typical request body:
{
"id": "1",
"systolic": 122.0,
"diastolic": 83.0
}
Response with the updated values:
{
"updated_value": {
"id": "9",
"systolic": "122.0",
"diastolic": "83.0"
}
}
Retrieve Blood Pressure Records (GET)
Retrieve all blood pressure log entries with a GET request to
{{PDS_API_URL}}/api/pds/view-blood-pressure. Example response:
[
{
"id": "1",
"instance": "0",
"source": "4043-40102",
"measurement_id": "0",
"source_device_type": "PDA",
"source_name": "Google Fit",
"source_instance": "0",
"record_created_timestamp": "1744810213",
"record_updated_timestamp": "1744810213",
"measurement_group": "Activity",
"blood_pressure_timestamp_start": "1648633780",
"blood_pressure_timestamp_end": "1648633780",
"systolic": "120.7",
"diastolic": "75.7",
"body_position": "1",
"body_position_description": "Standing up",
"measurement_location": "1",
"measurement_location_description": "Left wrist"
}
]
Filtering Blood Pressure GET Requests
Filtering options will be available in a future phase of the Measurements Feature Block release.