Definitions

pid

Property Value
Type object
Title PID
Description Object identifying the patient in the program
Default value
Examples
-
Required
  • use
  • type
  • system
  • value
Properties
use
Property Value
Type string
Title Use
Description Purpose of the identifier. Possible values are: usual | official | temp | secondary | old
Default value usual
Examples
usual
Required -
Properties
Additional Properties false

type
Property Value
Type object
Title Type
Description Type of the identifier
Default value
Examples
-
Required
  • coding
  • text
Properties
coding
Array of items referencing mrtype

text
Property Value
Type string
Title Text
Description Human readable representation of the identifier system
Default value Technical database identifier
Examples
_id_abc123
Required -
Properties
Additional Properties false
Additional Properties false

system
Property Value
Type string
Title System
Description Describes the system (namespace) in which the identifier is used
Default value de.mementor
Examples
de.mementor
Required -
Properties
Additional Properties false

value
Property Value
Type string
Title Value
Description The unique identifier of the patient
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false
Additional Properties false

mrtype

Property Value
Type object
Title MR Type
Description Describes the type of the identifier
Default value
Examples
-
Required
  • system
  • version
  • code
  • display
  • userSelected
Properties
system
Property Value
Type string
Title System
Description The identification of the code system that defines the meaning of the symbol in the code
Default value http://terminology.hl7.org/CodeSystem/v2-0203
Examples
http://terminology.hl7.org/CodeSystem/v2-0203
Required -
Properties
Additional Properties false

version
Property Value
Type string
Title Version
Description Version of the identifier used
Default value
Examples
1
Required -
Properties
Additional Properties false

code
Property Value
Type string
Title Code
Description Fixed value defined by the KBV_PR_Base_Patient profile
Default value MR
Examples
MR
Required -
Properties
Additional Properties false

display
Property Value
Type string
Title Display
Description Identifier value as displayed by the system
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

userSelected
Property Value
Type boolean
Title User Selected
Description Whether the user has selected this type of coding for the identifier
Default value false
Examples
false
Required -
Properties
Additional Properties false
Additional Properties false

KBV_PR_Base_Patient

Property Value
Type object
Title The FHIR-compliant KBV_PR_Base_Patient schema
Description Patient model according to the FHIR specification: see https://mio.kbv.de/pages/viewpage.action?pageId=31031611, specification see https://simplifier.net/base1x0/kbvprbasepatient
Default value {}
Examples
-
Required
  • pid
  • gender
  • birthDate
  • telecom
Properties
pid
Array of items referencing pid

gender
Property Value
Type string
Title Gender
Description The gender can have the values male | female | other | unknown
Default value
Examples
female
Required -
Properties
Additional Properties false

birthDate
Property Value
Type integer
Title The year of birth
Description Since in somnio, the birthdate is not captured, it is only possible to indicate a rough estimation of the birth year by subtracting the age from the user's joined date
Default value
Examples
1988
Required -
Properties
Additional Properties false

telecom
Property Value
Type array
Title Contact information based on the FHIR specification
Description Array of telecom data. At somnio, only the mail address is captured
Default value []
Examples
{
	"system": "email",
	"value": "mail@example.com"
}
Required -
Properties
Additional Properties false
Additional Properties false

module

Property Value
Type object
Title Module
Description User data stored per module during the somnio sleep training
Default value {}
Examples
-
Required
  • optional
  • progress
  • completed
  • startedDate
  • completionDate
  • history
  • requiredEntries
  • createdEntries
  • menuOpened
  • _id
  • module
Properties
optional
Property Value
Type boolean
Title Optional
Description Whether this module is optional and can be omitted during the sleep training
Default value false
Examples
false
Required -
Properties
Additional Properties false

progress
Property Value
Type integer
Title Progress
Description Progress of the user for the current module; in percent
Default value 0
Examples
100
Required -
Properties
Additional Properties false

completed
Property Value
Type boolean
Title Completed
Description Whether this module has been completed
Default value false
Examples
true
Required -
Properties
Additional Properties false

startedDate
Property Value
Type string
Title Started Date
Description Date at which the current module was started
Default value
Examples
2020-06-04T06:13:19.198Z
Required -
Properties
Additional Properties false

completionDate
Property Value
Type string
Title Completion Date
Description Date at which the current module was completed
Default value
Examples
2020-11-15T06:20:53.192Z
Required -
Properties
Additional Properties false

history
Property Value
Type array
Title History
Description References to other module versions that were used before the current module was updated
Default value []
Examples
[
	[
		"_id_abc123",
		"_id_abc123"
	]
]
Required -
Properties
Additional Properties false

requiredEntries
Property Value
Type integer
Title Required Entires
Description Number of sleep journal entries inserted after completion of the current module that must be present before the subsequent module can be started
Default value 0
Examples
3
Required -
Properties
Additional Properties false

createdEntries
Property Value
Type integer
Title Created Entries
Description Number of sleep journal entries that have been created since the current module was completed
Default value 0
Examples
2
Required -
Properties
Additional Properties false

Property Value
Type boolean
Title Menu Opened
Description Internal technical property to check whether the user has opened a referenced menu in the module
Default value false
Examples
false
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

module
Property Value
Type string
Title Module
Description Internal technical identifier pointing to a module object
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false
Additional Properties false

coaching

Property Value
Type object
Title Coaching
Description Properties stored for each coaching the user is assigned to
Default value {}
Examples
-
Required
  • version
  • published
  • _id
  • released
  • modules
  • key
  • name
  • __v
  • user
  • client
  • lastUpdate
Properties
version
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
9
Required -
Properties
Additional Properties false

published
Property Value
Type boolean
Title Published
Description Whether this coaching has been published, i.e. is available to be used
Default value false
Examples
false
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

released
Property Value
Type boolean
Title Released
Description Internal property used to specify whether this coaching is released and ready for active use
Default value false
Examples
true
Required -
Properties
Additional Properties false

modules
Array of items referencing module

key
Property Value
Type string
Title Key
Description Internal technical text to identify the coaching by name
Default value
Examples
SLEEP
Required -
Properties
Additional Properties false

name
Property Value
Type object
Title Name
Description Name of the coaching
Default value {}
Examples
{
	"_id": "_id_abc123",
	"de_ch": "Schlafcoaching",
	"fr_ch": "Coaching de sommeil",
	"en_us": "Sleep coaching",
	"it_ch": "Coaching del sonno"
}
Required
  • _id
  • de_ch
  • fr_ch
  • en_us
  • it_ch
Properties
_id
Property Value
Type string
Title ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

de_ch
Property Value
Type string
Title German Translation
Description German Coaching Name
Default value
Examples
Schlafcoaching
Required -
Properties
Additional Properties false

fr_ch
Property Value
Type string
Title French Translation
Description French Coaching Name
Default value
Examples
Coaching de sommeil
Required -
Properties
Additional Properties false

en_us
Property Value
Type string
Title English Translation
Description English Coaching Name
Default value
Examples
Sleep coaching
Required -
Properties
Additional Properties false

it_ch
Property Value
Type string
Title Italian Translation
Description Italian Coaching Name
Default value
Examples
Coaching del sonno
Required -
Properties
Additional Properties false
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
6
Required -
Properties
Additional Properties false

source
Property Value
Type string,null
Title Source
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Internal technical identifier referencing the user
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

client
Property Value
Type string
Title Client
Description Internal value used to reference a client
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

lastUpdate
Property Value
Type string
Title Last Update
Description Date at which the coaching was updated the last time
Default value
Examples
2019-10-24T13:31:48.619Z
Required -
Properties
Additional Properties false
Additional Properties false

license

Property Value
Type object
Title License
Description Describes the license with which the user is registered
Default value {}
Examples
-
Required
  • vouchers
  • _id
  • user
  • licenseType
  • datePaid
  • validUntil
  • __v
  • id
Properties
vouchers
Property Value
Type array
Title Vouchers
Description Reference to the vouchers attached to this license
Default value []
Examples
[
	"_id_abc123",
	"_id_abc123"
]
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Reference to the person that uses this license
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

coaching
Property Value
Type string
Title Coaching
Description Obsolete property that is no longer used
Default value
Examples
SLEEP
Required -
Properties
Additional Properties false

coachingKey
Property Value
Type string,null
Title Coaching Key
Description Reference to the coaching type the license is valid for
Default value
Examples
SLEEP
Required -
Properties
Additional Properties false

licenseType
Property Value
Type string
Title License Type
Description Describes the type of this license
Default value
Examples
diga
Required -
Properties
Additional Properties false

datePaid
Property Value
Type string
Title Activation Date
Description Specifies the date at which the license was created
Default value
Examples
2019-09-17T08:35:16.706Z
Required -
Properties
Additional Properties false

validUntil
Property Value
Type string
Title Expiration Date
Description Date up to which the license is valid
Default value
Examples
2021-10-28T08:35:16.709Z
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false

id
Property Value
Type string
Title ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false
Additional Properties false

voucher

Property Value
Type object
Title Voucher
Description Represents data about a license voucher
Default value {}
Examples
-
Required
  • validity
  • quantity
  • demoAccount
  • _id
  • code
  • provider
  • discount
  • client
  • __v
Properties
validity
Property Value
Type integer
Title Validity
Description For how many days the license duration will be extended when applying this voucher
Default value 0
Examples
90
Required -
Properties
Additional Properties false

quantity
Property Value
Type integer
Title Quantity
Description How many times this voucher can be redeemed
Default value 0
Examples
1
Required -
Properties
Additional Properties false

demoAccount
Property Value
Type boolean
Title Demo Account
Description Whether the account where this voucher is redeemed should be able to perform demo operations in the somnio application
Default value false
Examples
false
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

code
Property Value
Type string
Title Code
Description The code of this voucher: registration code/ license code
Default value
Examples
ABCD-EFGH-IJKL-MNOP
Required -
Properties
Additional Properties false

provider
Property Value
Type string,null
Title Provider
Description Reference to the institution that has issued the code
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

discount
Property Value
Type integer
Title Discount
Description The value in percentage by which the original price of a license is reduced. Defaults to 100: there application will be available at no additional charge
Default value 100
Examples
100
Required -
Properties
Additional Properties false

client
Property Value
Type string
Title Client
Description Internal value used to reference a client
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false
Additional Properties true

message

Property Value
Type object
Title Message
Description Data about a message that was sent to the user
Default value {}
Examples
-
Required
  • content
  • dateRead
  • _id
  • dateSent
  • messageType
  • senderMail
  • recipientMail
  • recipientUser
  • sendAsMail
  • subject
  • __v
Properties
content
Property Value
Type string
Title Message Content
Description Text that was sent, can be in HTML format
Default value
Examples

Ihre Lizenz für das Coaching Schlafcoaching wird in 7 Tagen ablaufen.

Required -
Properties
Additional Properties false

dateRead
Property Value
Type string,null
Title Date Read
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

dateSent
Property Value
Type string
Title Date Sent
Description Date at which the message was transmitted
Default value
Examples
2019-10-24T13:51:21.340Z
Required -
Properties
Additional Properties false

messageType
Property Value
Type string
Title Message Type
Description Identifier in text form to specify the type of the message
Default value
Examples
expiringLicenseNonDiga
Required -
Properties
Additional Properties false

senderMail
Property Value
Type string
Title Sender Mail
Description Sender E-Mail address
Default value
Examples
"mementor no-reply" 
Required -
Properties
Additional Properties false

recipientMail
Property Value
Type string
Title Recipient Mail
Description Recipient E-Mail address
Default value
Examples
mail@example.com
Required -
Properties
Additional Properties false

recipientUser
Property Value
Type string
Title Recipient User
Description Reference to the user that this message was sent to
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

sendAsMail
Property Value
Type boolean
Title Send as Mail
Description Whether this message was also transmitted via e-mail (as opposed to stored in the database only for application-internal usage)
Default value false
Examples
true
Required -
Properties
Additional Properties false

subject
Property Value
Type string
Title Subject
Description The subject of the message
Default value
Examples
Lizenz läuft bald ab
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false
Additional Properties false

sleepWindow

Property Value
Type object
Title Sleep Window
Description Data used to handle sleep windows
Default value {}
Examples
-
Required
  • _id
  • lastModified
  • user
  • start
  • end
  • duration
  • __v
  • efficiency
Properties
_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

lastModified
Property Value
Type string,null
Title Last Modified
Description Date at which the sleep window was last modified
Default value
Examples
2020-07-24T10:31:28.383Z
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Reference to the user that the sleep window was defined for
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

start
Property Value
Type string
Title Start
Description Time of day at which the sleep window starts, encoded as date-time
Default value
Examples
2020-07-23T22:50:00.000Z
Required -
Properties
Additional Properties false

end
Property Value
Type string
Title End
Description Time of day at which the sleep window ends, encoded as date-time
Default value
Examples
2020-07-24T04:50:00.000Z
Required -
Properties
Additional Properties false

duration
Property Value
Type integer
Title Duration
Description Duration of the sleep window in minutes
Default value 0
Examples
360
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false

efficiency
Property Value
Type number,null
Title Efficiency
Description Sleep efficiency in the last time interval that will be evaluate whether or not the sleep window can be extended
Default value 0
Examples
76.72
Required -
Properties
Additional Properties false
Additional Properties false

sleepJournalEntry

Property Value
Type object
Title Sleep Journal Protocol Entry
Description Sleep journal protocol entry storing information about the sleep
Default value {}
Examples
{
	"bedPhase": {
		"toBedDate": "2020-07-19T20:00:00.000Z",
		"getUpDate": "2020-07-20T04:20:00.000Z"
	},
	"sleepPhase": {
		"noSleep": false,
		"triedToSleepDate": "2020-07-19T20:20:00.000Z",
		"fallAsleepDate": "2020-07-19T20:40:00.000Z",
		"awakeAmount": 3,
		"awakeDuration": 20,
		"wakeUpDate": "2020-07-20T04:00:00.000Z",
		"quality": 74
	},
	"fromTracker": false,
	"_id": "_id_abc123",
	"user": "_id_abc123",
	"bedDuration": 500,
	"sleepDuration": 420,
	"fallAsleepDuration": 20,
	"activeAfterWakeup": 20,
	"efficiency": 84,
	"__v": 0
}
Required
  • bedPhase
  • sleepPhase
  • fromTracker
  • _id
  • user
  • bedDuration
  • sleepDuration
  • fallAsleepDuration
  • activeAfterWakeup
  • efficiency
  • __v
Properties
bedPhase
Property Value
Type object
Title Bed Phase
Description Captures the bed phase of a sleep journal entry
Default value {}
Examples
{
	"toBedDate": "2020-07-19T20:00:00.000Z",
	"getUpDate": "2020-07-20T04:20:00.000Z"
}
Required
  • toBedDate
  • getUpDate
Properties
toBedDate
Property Value
Type string,null
Title To Bed Date
Description Date at which the user went to bed
Default value
Examples
2020-07-19T20:00:00.000Z
Required -
Properties
Additional Properties false

getUpDate
Property Value
Type string,null
Title Get up Date
Description Date at which the user left the bed
Default value
Examples
2020-07-20T04:20:00.000Z
Required -
Properties
Additional Properties false
Additional Properties true

sleepPhase
Property Value
Type object
Title Sleep Phase
Description Captures the sleep phase of a sleep journal entry
Default value {}
Examples
-
Required
  • noSleep
  • fallAsleepDate
  • awakeDuration
  • wakeUpDate
  • quality
Properties
noSleep
Property Value
Type boolean
Title No Sleep
Description Whether the user did not sleep at all during the current sleep phase
Default value false
Examples
false
Required -
Properties
Additional Properties false

triedToSleepDate
Property Value
Type string,null
Title Tried to Sleep
Description Obsolete property that is no longer used
Default value
Examples
2020-07-19T20:20:00.000Z
Required -
Properties
Additional Properties false

fallAsleepDate
Property Value
Type string,null
Title Fall Asleep
Description Moment at which the user fell asleep
Default value
Examples
2020-07-19T20:40:00.000Z
Required -
Properties
Additional Properties false

awakeAmount
Property Value
Type integer
Title Awake Count
Description Obsolete property that is no longer used
Default value 0
Examples
3
Required -
Properties
Additional Properties false

awakeDuration
Property Value
Type integer
Title Awake Duration
Description Time in minutes the user stayed awake in the bed
Default value 0
Examples
20
Required -
Properties
Additional Properties false

wakeUpDate
Property Value
Type string,null
Title Wake Up Date
Description Moment at which the user woke up
Default value
Examples
2020-07-20T04:00:00.000Z
Required -
Properties
Additional Properties false

quality
Property Value
Type integer,null
Title Sleep Quality
Description Value between 0 and 100 which the user has evaluated the sleep quality with
Default value 0
Examples
74
Required -
Properties
Additional Properties false
Additional Properties true

fromTracker
Property Value
Type boolean
Title Sleep Tracker
Description Whether the data of the current sleep journal entry originates from a sleep tracker
Default value false
Examples
false
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Reference to the user this sleep journal entry is for
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

bedDuration
Property Value
Type integer
Title Bed Duration
Description Time in minutes during which the user stayed in bed
Default value 0
Examples
500
Required -
Properties
Additional Properties false

sleepDuration
Property Value
Type integer
Title Sleep Duration
Description Time in minutes during which the user slept
Default value 0
Examples
420
Required -
Properties
Additional Properties false

fallAsleepDuration
Property Value
Type integer
Title Fall Asleep Duration
Description Time in minutes it took the user to fall asleep after being ready to sleep
Default value 0
Examples
20
Required -
Properties
Additional Properties false

activeAfterWakeup
Property Value
Type integer
Title Activity After Wakeup
Description Time in minutes the user stayed in bed after having woken up before actually getting up
Default value 0
Examples
20
Required -
Properties
Additional Properties false

efficiency
Property Value
Type number,null
Title Efficiency
Description The calculated sleep efficiency of this entry
Default value 0
Examples
84
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false
Additional Properties false

awakeJournalEntry

Property Value
Type object
Title Awake Journal Protocol Entry
Description Awake journal protocol entry storing information about the day
Default value {}
Examples
-
Required
  • _id
  • created
  • mood
  • performance
  • energy
  • alcoholRecent
  • caffeineRecent
  • user
  • __v
Properties
_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

created
Property Value
Type string
Title Created Date
Description Date at which this entry was created
Default value
Examples
2020-08-10T09:59:00.000Z
Required -
Properties
Additional Properties false

mood
Property Value
Type integer
Title Mood
Description Value between 0 and 10 which the user has evaluated his mood during since the last sleep phase with. 0 means very bad mood, 10 means very good mood
Default value 0
Examples
5
Required -
Properties
Additional Properties false

performance
Property Value
Type integer
Title Performance
Description Value between 0 and 10 which the user has evaluated his performance since the last sleep phase with. 0 means very poor performance, 10 means very high performance
Default value 0
Examples
2
Required -
Properties
Additional Properties false

energy
Property Value
Type integer
Title Energy
Description Value between 0 and 10 which the user has evaluated his energy since the last sleep phase with. 0 means very low energy, 10 means plenty of energy
Default value 0
Examples
4
Required -
Properties
Additional Properties false

alcoholRecent
Property Value
Type integer
Title Alcohol Consumption
Description Alcohol consumption since the last sleep phase. Value between 0 (no alcohol consumption) and 3 (consumed a lot of alcohol)
Default value 0
Examples
2
Required -
Properties
Additional Properties false

caffeineRecent
Property Value
Type integer
Title Caffeine Consumption
Description Caffeine consumption since the last sleep phase. Value between 0 (no caffeine consumption) and 3 (consumed a lot of caffeine)
Default value 0
Examples
2
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Reference to the user this awake journal entry is for
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false
Additional Properties false

answer

Property Value
Type object
Title Answer
Description Data container that stores the answer/ option the user has selected throughout the program, for example by picking an item of a selection or by entering a text when asked for feedback
Default value {}
Examples
-
Required
  • history
  • updates
  • _id
  • answerContainer
  • client
  • user
  • __v
  • value
  • created
Properties
history
Array of items referencing answerEntry

updates
Property Value
Type integer
Title Updates
Description Number of times this answer has been updated
Default value 0
Examples
5
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

answerContainer
Property Value
Type string
Title Answer Container
Description Technical reference to the database object which specifies properties of the question this answer is valid for
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

client
Property Value
Type string
Title Client
Description Internal value used to reference a client
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

user
Property Value
Type string
Title User
Description Reference to the user that has given this answer value
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
0
Required -
Properties
Additional Properties false

value
Property Value
Type string
Title Value
Description The actual answer of the user. Can also be integers, saved in text format
Default value
Examples
Alex
Required -
Properties
Additional Properties false

created
Property Value
Type string,null
Title Created
Description Date at which the answer was given
Default value
Examples
2020-07-09T16:03:25.550Z
Required -
Properties
Additional Properties false
Additional Properties false

answerEntry

Property Value
Type object
Title Answer Entry
Description Describes the location and value an answer was given for
Default value {}
Examples
-
Required
  • saved
  • step
  • value
Properties
saved
Property Value
Type string
Title Saved Date
Description Date at which the answer was saved
Default value
Examples
2019-12-16T19:46:32.883Z
Required -
Properties
Additional Properties false

step
Property Value
Type string
Title Step
Description Reference to the step, i.e. part of the module, which this answer was given for
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

value
Property Value
Type string
Title Answer Value
Description The actual answer of the user. Can also be integers, saved in text format
Default value
Examples
Alex
Required -
Properties
Additional Properties false
Additional Properties false

Structure

Property Value
Type object
Title Schema definition for the DiGA somnio
Description This schema specifies the semantics and the grammar of the file that is generated when exporting a user's profile data. Throughout the example, database internal identifiers as well as randomly generated strings are used. If the value in the example is an internal database id, the string '_id_abc123' is used in this documentation. Random strings are specified as '_randomString_abc123' in the example. Note that in order to avoid multiple and duplicate examples, only base type examples are provided in the JSON schema documentation for non-complex types. However, a full example that includes all properties is given for the entire profile export at the top level
Default value {}
Examples
{
	"fhir": {
		"KBV_PR_Base_Patient": {
			"pid": [
				{
					"use": "usual",
					"type": {
						"coding": [
							{
								"MR-Type": {
									"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
									"version": "1",
									"code": "MR",
									"display": "_id_abc123",
									"userSelected": false
								}
							}
						],
						"text": "Technical database identifier"
					},
					"system": "de.mementor",
					"value": "_id_abc123"
				}
			],
			"active": true,
			"gender": "female",
			"birthDate": 1988,
			"telecom": [
				{
					"system": "email",
					"value": "mail@example.com"
				}
			]
		}
	},
	"mementor": {
		"user": {
			"profile": {
				"medicalAccess": {
					"code": "VTYAPGZT",
					"validUntil": "2020-11-26T14:43:25.945Z",
					"used": false
				},
				"sleepTracker": {
					"accessToken": "_randomString_abc123",
					"provider": "fitbit",
					"expiresInSeconds": 31536000,
					"providerUserId": "6DQSA2",
					"refreshToken": "_randomString_abc123"
				},
				"generali": {
					"recordId": 0,
					"cancelled": false,
					"phase": 0
				},
				"clients": [
					"_id_abc123"
				],
				"dataProcessingConsent": true,
				"dataProcessingConsentDate": null,
				"language": "de_ch",
				"active": true,
				"anonymized": false,
				"speakingRate": 9,
				"showSubtitles": false,
				"autoNext": true,
				"loginCount": 1157,
				"trustedDevices": [
					"_randomString_abc123",
					"_randomString_abc123"
				],
				"twoFactorAuthentication": true,
				"newsletter": false,
				"notifications": true,
				"_id": "_id_abc123",
				"joined": "2020-08-01T08:03:07.308Z",
				"email": "mail@example.com",
				"__v": 37,
				"lastLogin": "2020-11-27T09:42:49.619Z",
				"name": "Benutzername 123",
				"coachingId": "_id_abc123",
				"lastReadSystemNotifications": "2020-07-26T16:58:59.717Z",
				"gender": "female",
				"age": 22,
				"notificationUpdateHash": "bf4ef823d3a65f64c27433131c2d4e65bde74928",
				"resetToken": "_randomString_abc123",
				"resetTokenCreatedDate": "2020-11-13T09:51:49.896Z",
				"newEmail": "newMail@example.com",
				"newEmailToken": "_randomString_abc123",
				"newEmailTokenCreatedDate": "2020-11-23T12:59:32.097Z",
				"demoAccount": false
			},
			"roles": [
				{
					"_id": "_id_abc123",
					"name": "support",
					"user": "_id_abc123",
					"client": "_id_abc123",
					"__v": 0
				}
			]
		},
		"licensing": {
			"licenses": [
				{
					"vouchers": [
						"_id_abc123"
					],
					"_id": "_id_abc123",
					"user": "_id_abc123",
					"coachingKey": "SLEEP",
					"licenseType": "diga",
					"datePaid": "2019-10-25T17:42:02.486Z",
					"validUntil": "2020-10-25T17:42:02.486Z",
					"__v": 0,
					"id": "_id_abc123"
				}
			],
			"vouchers": [
				{
					"validity": 0,
					"quantity": 1,
					"demoAccount": false,
					"_id": "_id_abc123",
					"code": "ABCD-EFGH-IJKL-MNOP",
					"coachingKey": "SLEEP",
					"provider": "_id_abc123",
					"discount": 100,
					"client": "_id_abc123",
					"__v": 0
				}
			]
		},
		"communication": {
			"messages": [
				{
					"content": "

Ihre Lizenz für das Coaching Schlafcoaching wird in 7 Tagen ablaufen.

", "dateRead": null, "_id": "_id_abc123", "dateSent": "2019-10-24T13:51:21.340Z", "messageType": "expiringLicenseNonDiga", "senderMail": "\"mementor no-reply\" ", "recipientMail": "mail.example@com", "recipientUser": "_id_abc123", "sendAsMail": true, "subject": "Lizenz läuft bald ab", "__v": 0 }, { "content": "

Du hast in den letzten drei Tagen vergessen, das Schlaftagebuch auszufüllen

", "dateRead": null, "_id": "_id_abc123", "dateSent": "2019-10-24T13:51:21.340Z", "messageType": "sleepJournalReminder", "senderMail": "\"mementor no-reply\" ", "recipientMail": "mail.example@com", "recipientUser": "_id_abc123", "sendAsMail": true, "subject": "Schlaftagebucheinträge vergessen", "__v": 0 } ] }, "training": { "coachings": [ { "version": 9, "published": false, "_id": "_id_abc123", "released": true, "modules": [ { "optional": false, "progress": 100, "completed": true, "startedDate": "2020-06-04T06:13:19.198Z", "completionDate": "2020-11-15T06:20:53.192Z", "history": [], "requiredEntries": 0, "createdEntries": 0, "menuOpened": false, "_id": "_id_abc123", "module": "_id_abc123" }, { "optional": false, "progress": 100, "completed": true, "startedDate": "2020-07-24T10:28:18.405Z", "completionDate": "2020-11-15T06:20:53.193Z", "history": [ "_id_abc123", "_id_abc123" ], "requiredEntries": 3, "createdEntries": 1, "menuOpened": true, "_id": "_id_abc123", "module": "_id_abc123" } ], "key": "SLEEP", "name": { "_id": "_id_abc123", "de_ch": "Schlafcoaching", "fr_ch": "Coaching de sommeil", "en_us": "Sleep coaching", "it_ch": "Coaching del sonno" }, "__v": 6, "user": "_id_abc123", "client": "_id_abc123", "lastUpdate": "2019-10-24T13:31:48.619Z" } ], "sleepWindows": [ { "_id": "_id_abc123", "lastModified": "2020-07-24T10:31:28.383Z", "user": "_id_abc123", "start": "2020-07-23T22:50:00.000Z", "end": "2020-07-24T04:50:00.000Z", "duration": 360, "__v": 0, "efficiency": 76.72783521303259 }, { "_id": "_id_abc123", "start": "2020-07-23T23:00:00.000Z", "end": "2020-07-24T05:00:00.000Z", "duration": 360, "lastModified": "2020-10-01T06:57:44.735Z", "efficiency": null, "user": "_id_abc123", "__v": 0 } ], "userInputs": { "sleepJournal": { "sleepJournalEntries": [ { "bedPhase": { "toBedDate": "2020-07-19T20:00:00.000Z", "getUpDate": "2020-07-20T04:20:00.000Z" }, "sleepPhase": { "noSleep": false, "triedToSleepDate": "2020-07-19T20:20:00.000Z", "fallAsleepDate": "2020-07-19T20:40:00.000Z", "awakeAmount": 3, "awakeDuration": 20, "wakeUpDate": "2020-07-20T04:00:00.000Z", "quality": 74 }, "fromTracker": false, "_id": "_id_abc123", "user": "_id_abc123", "bedDuration": 500, "sleepDuration": 420, "fallAsleepDuration": 20, "activeAfterWakeup": 20, "efficiency": 84, "__v": 0 }, { "bedPhase": { "toBedDate": "2020-07-20T20:00:00.000Z", "getUpDate": "2020-07-21T04:00:00.000Z" }, "sleepPhase": { "noSleep": false, "triedToSleepDate": "2020-07-20T20:20:00.000Z", "fallAsleepDate": "2020-07-20T20:30:00.000Z", "awakeAmount": 1, "awakeDuration": 1, "wakeUpDate": "2020-07-21T03:00:00.000Z", "quality": 83 }, "fromTracker": false, "_id": "_id_abc123", "user": "_id_abc123", "bedDuration": 480, "sleepDuration": 389, "fallAsleepDuration": 10, "activeAfterWakeup": 60, "efficiency": 81.04166666666667, "__v": 0 } ], "awakeJournalEntries": [ { "_id": "_id_abc123", "created": "2020-08-10T09:59:00.000Z", "mood": 5, "performance": 2, "energy": 4, "alcoholRecent": 2, "caffeineRecent": 2, "user": "_id_abc123", "__v": 0 }, { "_id": "_id_abc123", "created": "2020-10-23T09:48:00.000Z", "mood": 4, "performance": 3, "energy": 5, "alcoholRecent": 2, "caffeineRecent": 1, "user": "_id_abc123", "__v": 0 } ] }, "answers": [ { "history": [ { "saved": "2019-12-16T19:46:32.883Z", "step": "_id_abc123", "value": "Alex" }, { "saved": "2019-12-16T19:52:47.972Z", "step": "_id_abc123", "value": "Benita" } ], "updates": 5, "_id": "_id_abc123", "answerContainer": "_id_abc123", "client": "_id_abc123", "user": "_id_abc123", "__v": 0, "value": "Mein Benutzername 123", "created": "2020-11-27T09:43:38.379Z" }, { "history": [], "updates": 10, "_id": "_id_abc123", "answerContainer": "_id_abc123", "client": "_id_abc123", "user": "_id_abc123", "__v": 0, "value": "9", "created": "2020-11-27T09:43:38.380Z" } ] } } } }
Required
  • fhir
  • mementor
Properties
fhir
Property Value
Type object
Title The DiGA data compliant with the fhir schema
Description This property contains the data that are consistent with the FHIR standard. Note that some of the values might also be listed in another format and/ or form in other properties of the JSON schema. For example, the birth year is specified in the 'fhir' part, whereas in the 'mementor' property, the age is used instead
Default value {}
Examples
-
Required
  • KBV_PR_Base_Patient
Properties
{refTitle} references KBV_PR_Base_Patient
Additional Properties false

mementor
Property Value
Type object
Title Mementor Data
Description This part of the profile export contains data that is required to run the somnio app. This can include sleep data that was captured from external devices, but the values stored at mementor is in a custom format
Default value {}
Examples
-
Required
  • user
  • licensing
  • communication
  • training
Properties
user
Property Value
Type object
Title User
Description Data that are related to the user that is using the app
Default value {}
Examples
-
Required
  • profile
  • roles
Properties
profile
Property Value
Type object
Title Profile
Description Profile related values about the user
Default value {}
Examples
-
Required
  • medicalAccess
  • sleepTracker
  • generali
  • clients
  • dataProcessingConsent
  • language
  • active
  • anonymized
  • speakingRate
  • showSubtitles
  • autoNext
  • loginCount
  • trustedDevices
  • twoFactorAuthentication
  • newsletter
  • notifications
  • _id
  • joined
  • email
  • __v
  • lastLogin
  • name
  • coachingId
  • lastReadSystemNotifications
  • gender
  • age
  • notificationUpdateHash
Properties
medicalAccess
Property Value
Type object
Title Medical Access
Description If a user wants to provide a timely limited access to another person of his trust, he can do so. In order to protect that access of an external user, the medicalAccess schema data are used
Default value {}
Examples
-
Required
  • code
  • validUntil
  • used
Properties
code
Property Value
Type string
Title Access code
Description Code that is randomly generated and used by a third person to view the somnio user's profile data
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

validUntil
Property Value
Type string
Title Date of expiration
Description A third person can access the user's date up to this date
Default value
Examples
2020-11-26T14:43:25.945Z
Required -
Properties
Additional Properties false

used
Property Value
Type boolean
Title Access used
Description Keeps track of the third person access. If a person has had access to the user's profile, this value is set to true, preventing any further user data access
Default value false
Examples
false
Required -
Properties
Additional Properties false
Additional Properties false

sleepTracker
Property Value
Type object
Title Sleep Tracker
Description Technical data used to establish a connection with a sleep tracking device
Default value {}
Examples
-
Required
  • accessToken
  • provider
  • expiresInSeconds
  • providerUserId
  • refreshToken
Properties
requestTokenSecret
Property Value
Type string,null
Title Request Token Secret
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false

accessToken
Property Value
Type string,null
Title AccessToken
Description Access token to request data from the sleep tracking provider API
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

provider
Property Value
Type string,null
Title Provider
Description Name of the sleep tracker provider that is used
Default value
Examples
fitbit
Required -
Properties
Additional Properties false

expiresInSeconds
Property Value
Type integer,null
Title Expiration
Description Delay after which the access token expires
Default value 0
Examples
31536000
Required -
Properties
Additional Properties false

providerUserId
Property Value
Type string,null
Title Provider user id
Description Provider-specific identifier of the user (which is not the same as the somnio user id)
Default value
Examples
6DQSX2
Required -
Properties
Additional Properties false

refreshToken
Property Value
Type string,null
Title RefreshToken
Description Token used to refresh the access at the sleep tracking provider
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

accessTokenSecret
Property Value
Type string,null
Title Access Token Secret
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false
Additional Properties false

generali
Property Value
Type object
Title Generali
Description Information required to communicate with the Generali api
Default value {}
Examples
-
Required
Properties
participationId
Property Value
Type integer
Title ParticipationId
Description Technical identifier used to communicate with the Generali api
Default value 0
Examples
0
Required -
Properties
Additional Properties false

coaching
Property Value
Type string
Title Coaching
Description Reference to the coaching type the user is assigned to
Default value SLEEP
Examples
SLEEP
Required -
Properties
Additional Properties false

recordId
Property Value
Type integer
Title RecordId
Description Technical identifier used to communicate with the Generali api
Default value 0
Examples
0
Required -
Properties
Additional Properties false

cancelled
Property Value
Type boolean
Title Cancelled
Description Technical value used to communicate with the Generali api
Default value false
Examples
false
Required -
Properties
Additional Properties false

phase
Property Value
Type integer,null
Title Phase
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false
Additional Properties false

clients
Property Value
Type array
Title Clients
Description Internal value used to assign a user to a client. Note that this does NOT specify an origin, e.g. a medical institution or doctor or health insurance
Default value [["mementor"]]
Examples
[
	"mementor"
]
Required -
Properties
Additional Properties false

dataProcessingConsent
Property Value
Type boolean
Title Data Processing Consent
Description Whether or not the user has agreed to the data processing terms. If set to FALSE, the user cannot log in and use the application anymore. Hence, all active users have this value set to true
Default value false
Examples
true
Required -
Properties
Additional Properties false

dataProcessingConsentDate
Property Value
Type string
Title Data Processing Consent Date
Description Date at which the user has agreed to the data processing terms
Default value null
Examples
2020-08-01T14:43:25.945Z
Required -
Properties
Additional Properties false

language
Property Value
Type string
Title Language
Description The language the user has set to use the app in. Possible values are: en_us, de_ch, fr_ch
Default value
Examples
de_ch
Required -
Properties
Additional Properties false

active
Property Value
Type boolean
Title Active
Description Specifies the state of the profile regarding the program use. Set to FALSE until the user has activated the program
Default value false
Examples
true
Required -
Properties
Additional Properties false

anonymized
Property Value
Type boolean
Title Anonymized
Description If a user account is deleted, his profile is reset and user input data is deleted from the database. In this case, the anomyized property is set to true
Default value false
Examples
false
Required -
Properties
Additional Properties false

speakingRate
Property Value
Type integer
Title Speaking Rate
Description Setting describing the speed rate at which the speech is played back. Possible values are 1 - 9
Default value 0
Examples
5
Required -
Properties
Additional Properties false

showSubtitles
Property Value
Type boolean
Title Subtitles
Description Setting describing whether the subtitles are displayed during speech playback
Default value false
Examples
false
Required -
Properties
Additional Properties false

autoNext
Property Value
Type boolean
Title Auto Next
Description Setting describing whether during program execution after a step is completed, the step should automatically be played back if possible
Default value false
Examples
true
Required -
Properties
Additional Properties false

loginCount
Property Value
Type integer
Title Login Count
Description Number of times that the user has logged into the app
Default value 0
Examples
1291
Required -
Properties
Additional Properties false

trustedDevices
Property Value
Type array
Title Trusted Devices
Description Contains a list of machine identifiers for which the user has executed the two phase authentication
Default value []
Examples
[
	"_randomString_abc123",
	"_randomString_abc123"
]
Required -
Properties
Additional Properties false

twoFactorAuthentication
Property Value
Type boolean
Title Two Factor Authentication
Description If enabled, the user can only log in to the somnio app on new devices when entering a two phase authentication token
Default value true
Examples
false
Required -
Properties
Additional Properties false

newsletter
Property Value
Type boolean
Title Newsletter
Description Specifies whether the user would like to receive newsletters
Default value false
Examples
false
Required -
Properties
Additional Properties false

notifications
Property Value
Type boolean
Title Receive Notifications
Description Specifies whether the user would like to receive program related notifications sent to his mail address
Default value false
Examples
true
Required -
Properties
Additional Properties false

_id
Property Value
Type string
Title _ID
Description Internal technical identifier with no semantic meaning
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

joined
Property Value
Type string
Title Joined Date
Description Date at which the user has registered
Default value
Examples
2019-07-12T08:03:07.308Z
Required -
Properties
Additional Properties false

email
Property Value
Type string
Title E-Mail
Description The user's e-mail address
Default value
Examples
mail@example.com
Required -
Properties
Additional Properties false

__v
Property Value
Type integer
Title Version
Description Internal technical database record version
Default value 0
Examples
37
Required -
Properties
Additional Properties false

lastLogin
Property Value
Type string
Title Last Login
Description Date at which the user has logged in the last
Default value
Examples
2020-11-27T09:42:49.619Z
Required -
Properties
Additional Properties false

name
Property Value
Type string
Title User Name
Description The user name the user has chosen
Default value
Examples
My User Name
Required -
Properties
Additional Properties false

coachingId
Property Value
Type string
Title Coaching
Description Internal technical identifier pointing to the last coaching the user was working on
Default value
Examples
_id_abc123
Required -
Properties
Additional Properties false

lastCoachingId
Property Value
Type string,null
Title Last Coaching ID
Description Obsolete property that is no longer used
Default value null
Examples
null
Required -
Properties
Additional Properties false

lastReadSystemNotifications
Property Value
Type string
Title Last Read System Notifications
Description Date at which the user has read the app system messages the last time
Default value
Examples
2020-07-26T16:58:59.717Z
Required -
Properties
Additional Properties false

gender
Property Value
Type string
Title Gender
Description The user gender. Possible values: male | female | other | null
Default value
Examples
female
Required -
Properties
Additional Properties false

age
Property Value
Type integer
Title Age
Description The user's age
Default value 0
Examples
22
Required -
Properties
Additional Properties false

notificationUpdateHash
Property Value
Type string
Title Notification Update Hash
Description Internal random technical string used when updating the mail notification preferences
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

resetToken
Property Value
Type string
Title Reset Token
Description Internal random technical string used when resetting the password
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

resetTokenCreatedDate
Property Value
Type string
Title Reset Token Created Date
Description Date at which the user has requested a new password. Used internally
Default value
Examples
2020-11-13T09:51:49.896Z
Required -
Properties
Additional Properties false

newEmail
Property Value
Type string
Title New EMail
Description New e-mail address the user has desired to use this account with. This value is reset once the user's mail address has been confirmed
Default value
Examples
mail2@example.com
Required -
Properties
Additional Properties false

newEmailToken
Property Value
Type string
Title New Email Token
Description Internal random technical string used when setting a new email address
Default value
Examples
_randomString_abc123
Required -
Properties
Additional Properties false

newEmailTokenCreatedDate
Property Value
Type string
Title New Email Token Created Date
Description Date at which the user has requested to set a new email address. Used internally
Default value
Examples
2020-11-23T12:59:32.097Z
Required -
Properties
Additional Properties false

demoAccount
Property Value
Type boolean
Title Demo Account
Description Whether the account should be able to perform demo operations in the somnio application
Default value false
Examples
false
Required -
Properties
Additional Properties false
Additional Properties false

roles
Property Value
Type array
Title Roles
Description List of roles that the user has; used internally
Default value []
Examples
-
Required -
Properties
Additional Properties false
Additional Properties false

licensing
Property Value
Type object
Title Licensing
Description Information about the somnio app usage access, including licensing and voucher data
Default value {}
Examples
-
Required
  • licenses
  • vouchers
Properties
licenses
Array of items referencing license

vouchers
Array of items referencing voucher
Additional Properties false

communication
Property Value
Type object
Title Communication
Description Data used in the communication between the app and the user
Default value []
Examples
[]
Required
  • messages
Properties
messages
Array of items referencing message
Additional Properties false

training
Property Value
Type object
Title Training
Description Captures data that is relevant when using the somnio app
Default value {}
Examples
-
Required
  • coachings
  • sleepWindows
  • userInputs
Properties
coachings
Array of items referencing coaching

sleepWindows
Array of items referencing sleepWindow

userInputs
Property Value
Type object
Title User Input
Description Data that the user has entered throughout the app usage
Default value {}
Examples
-
Required
  • sleepJournal
  • answers
Properties
sleepJournal
Property Value
Type object
Title Sleep Journal
Description Information about the sleep journal (sleep protocols) stored for the user
Default value {}
Examples
-
Required
  • sleepJournalEntries
  • awakeJournalEntries
Properties
sleepJournalEntries
Array of items referencing sleepJournalEntry

awakeJournalEntries
Array of items referencing awakeJournalEntry
Additional Properties false

answers
Array of items referencing answer
Additional Properties false
Additional Properties false
Additional Properties false
Additional Properties false