Sleep Session

Return to types list

Type Properties

Properties
PropertyValue
id11c52484-7f1a-11db-aeac-87d355d89593
nameSleep Session
uncreatablefalse
immutablefalse
singletonfalse
transformsform, mtt, stt

Type Details

sleep-am  Schema for a morning sleep journal.
NameTypeIsRequiredDescription
whend:date-timeYesThe date and time that the journal entry refers to.
bed-timed:timeYesThe time the person went to bed.
wake-timed:timeYesThe time the person woke up for a period of activity.
sleep-minutesnonNegativeIntegerYesThe number of minutes slept.
settling-minutesnonNegativeIntegerYesThe number of minutes it took to fall asleep.
awakeningsjam:AwakeningNoThe time and duration of each the person awoke during the night.
medicationst:codable-valueNoA description of the medications taken before going to bed.
wake-state Yes 
Awakening  A time and duration of an awakening during a period of sleep.
NameTypeIsRequiredDescription
whend:timeYesThe time when the person awoke.
minutesnonNegativeIntegerYesThe duration the person stayed awake in minutes.

Schema

Open schema as a file

Verify XML against this schema

<schema xmlns:sjam="urn:com.microsoft.wc.thing.sjam" xmlns:t="urn:com.microsoft.wc.thing.types" xmlns:d="urn:com.microsoft.wc.dates" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:com.microsoft.wc.thing.sjam">
  <import namespace="urn:com.microsoft.wc.thing.types" schemaLocation="base.xsd" />
  <import namespace="urn:com.microsoft.wc.dates" schemaLocation="dates.xsd" />
  <annotation>
    <documentation>
      <type-id>11C52484-7F1A-11DB-AEAC-87D355D89593</type-id>
      <type-name>Sleep Session</type-name>
      <effective-date-element>when</effective-date-element>
      <wrapper-class-name>SleepJournalAM</wrapper-class-name>
      <wrapper-class-fwlink>136233</wrapper-class-fwlink>
      <sample-xml-fwlink>136234</sample-xml-fwlink>
      <data-type-guide-fwlink>136232</data-type-guide-fwlink>
      <summary>Schema for a morning sleep journal.</summary>
      <remarks>A morning sleep journal reflects back on the previous nightssleep. The data items were adapted from the NIH publication #06-5271,November 2005, "Your Guide to Healthy Sleep", ISBN 1-933236-05-1.</remarks>
    </documentation>
  </annotation>
  <complexType name="Awakening">
    <annotation>
      <documentation>
        <summary>A time and duration of an awakening during a period of sleep.</summary>
        <remarks>An awakening covers those times during a sleep sessionin which the person awoke and then went back to sleep.For example, if a person wakes up during a night's sleep to use the restroom and then returns to sleep. Itdoes not include awakenings that result in the person remaining awake for active periods.</remarks>
      </documentation>
    </annotation>
    <sequence>
      <element name="when" type="d:time">
        <annotation>
          <documentation>
            <summary>The time when the person awoke.</summary>
          </documentation>
        </annotation>
      </element>
      <element name="minutes" type="nonNegativeInteger">
        <annotation>
          <documentation>
            <summary>The duration the person stayed awake in minutes.</summary>
          </documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <element name="sleep-am">
    <complexType>
      <annotation>
        <documentation>
          <summary>Schema for a morning sleep journal.</summary>
          <remarks>A morning sleep journal reflects back on the previous nightssleep. The data items were adapted from the NIH publication #06-5271,November 2005, "Your Guide to Healthy Sleep", ISBN 1-933236-05-1.</remarks>
        </documentation>
      </annotation>
      <sequence>
        <element name="when" type="d:date-time">
          <annotation>
            <documentation>
              <summary>The date and time that the journal entry refers to.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="bed-time" type="d:time">
          <annotation>
            <documentation>
              <summary>The time the person went to bed.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="wake-time" type="d:time">
          <annotation>
            <documentation>
              <summary>The time the person woke up for a period of activity.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="sleep-minutes" type="nonNegativeInteger">
          <annotation>
            <documentation>
              <summary>The number of minutes slept.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="settling-minutes" type="nonNegativeInteger">
          <annotation>
            <documentation>
              <summary>The number of minutes it took to fall asleep.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="awakening" type="sjam:Awakening" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
              <summary>The time and duration of each the person awoke during the night.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="medications" type="t:codable-value" minOccurs="0">
          <annotation>
            <documentation>
              <summary>A description of the medications taken beforegoing to bed.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="wake-state">
          <simpleType>
            <annotation>
              <documentation>
                <summary>An evaluation of how the person felt when they got up in the morning.</summary>
                <remarks>1 = Wide awake,2 = Awake but a little tired,3 = Sleepy</remarks>
              </documentation>
            </annotation>
            <restriction base="int">
              <minInclusive value="1" />
              <maxInclusive value="3" />
            </restriction>
          </simpleType>
        </element>
      </sequence>
    </complexType>
  </element>
</schema>


Columns

Columns describe this type in the STT and MTT transformations.

Columns
TagLabelTypeWidth
whenDateString50
bed-timeBed TimeString100
wake-timeWake TimeString100
sleep-minutesSleep TimeString100
settling-minutesSettling TimeString100
wc-idIDString50
wc-versionVersion StampString50
wc-noteNoteString100
wc-tagsTagsString100
wc-dateEffective DateDateTime50
wc-typeType NameString50
wc-typeidType IDString50
wc-sourceSourceString100
wc-brandsBrandsString100
wc-relatedthingsRelated ItemsString100
wc-ispersonalIs PersonalBoolean40
wc-audit-personnameChanged byString100
wc-audit-dateDateDateTime100
wc-audit-actionActionString100
wc-audit-appnameProgramString100
wc-issignedSignedBoolean50
wc-isdownversionedDown VersionedBoolean50
wc-isupversionedUp VersionedBoolean50
wc-stateItem StateString50