Sleep Related Activity

Return to types list

Type Properties

Properties
PropertyValue
id031f5706-7f1a-11db-ad56-7bd355d89593
nameSleep Related Activity
uncreatablefalse
immutablefalse
singletonfalse
transformsform, mtt, stt

Type Details

sleep-pm  Defines an evening sleep journal.
NameTypeIsRequiredDescription
whend:date-timeYesThe date and time that the journal entry refers to.
caffeined:timeNoThe time of each caffeine consumed for the day.
alcohold:timeNoThe time of each alcohol consumed for the day.
napsjpm:ActivityNoThe time and duration of each nap taken in the day.
exercisesjpm:ActivityNoThe time and duration of each exercise session in the day. Note, an application should (but is not required) to query the aerobic sessions in the person's health record to fill in this information.
sleepiness Yes 
Activity  Defines an activity taken by the person before laying down for the night.
NameTypeIsRequiredDescription
whend:timeYesThe time when the activity occurred.
minutesnonNegativeIntegerYesThe duration of the activity in minutes.

Schema

Open schema as a file

Verify XML against this schema

<schema xmlns:sjpm="urn:com.microsoft.wc.thing.sjpm" 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.sjpm">
  <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>031F5706-7F1A-11DB-AD56-7BD355D89593</type-id>
      <type-name>Sleep Related Activity</type-name>
      <wrapper-class-name>SleepJournalPM</wrapper-class-name>
      <wrapper-class-fwlink>136230</wrapper-class-fwlink>
      <sample-xml-fwlink>136231</sample-xml-fwlink>
      <data-type-guide-fwlink>136229</data-type-guide-fwlink>
      <summary>Defines an evening sleep journal.</summary>
      <remarks>The data items in this schema are adapted from NIHpublication #06-5271, November 2005, "Your Guide toHealthy Sleep", ISBN 1-933236-05-1.</remarks>
      <effective-date-element>when</effective-date-element>
    </documentation>
  </annotation>
  <complexType name="Activity">
    <annotation>
      <documentation>
        <summary>Defines an activity taken by the person before laying downfor the night.</summary>
      </documentation>
    </annotation>
    <sequence>
      <element name="when" type="d:time">
        <annotation>
          <documentation>
            <summary>The time when the activity occurred.</summary>
          </documentation>
        </annotation>
      </element>
      <element name="minutes" type="nonNegativeInteger">
        <annotation>
          <documentation>
            <summary>The duration of the activity in minutes.</summary>
          </documentation>
        </annotation>
      </element>
    </sequence>
  </complexType>
  <element name="sleep-pm">
    <complexType>
      <annotation>
        <documentation>
          <summary>Defines an evening sleep journal.</summary>
          <remarks>The data items in this schema are adapted from NIHpublication #06-5271, November 2005, "Your Guide toHealthy 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 refersto.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="caffeine" type="d:time" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
              <summary>The time of each caffeine consumed for the day.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="alcohol" type="d:time" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
              <summary>The time of each alcohol consumed for the day.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="nap" type="sjpm:Activity" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
              <summary>The time and duration of each nap taken in theday.</summary>
            </documentation>
          </annotation>
        </element>
        <element name="exercise" type="sjpm:Activity" minOccurs="0" maxOccurs="unbounded">
          <annotation>
            <documentation>
              <summary>The time and duration of each exercise session in the day.</summary>
              <remarks>Note, an application should (but is not required)to query the aerobic sessions in the person's health record to fill in this information.</remarks>
            </documentation>
          </annotation>
        </element>
        <element name="sleepiness">
          <simpleType>
            <annotation>
              <documentation>
                <summary>How sleepy the person felt during the day.</summary>
                <remarks>1 = So sleepy had to struggle to stay awayduring much of the day,2 = Somewhat tired3 = Fairly alert4 = Wide awake</remarks>
              </documentation>
            </annotation>
            <restriction base="int">
              <minInclusive value="1" />
              <maxInclusive value="4" />
            </restriction>
          </simpleType>
        </element>
      </sequence>
    </complexType>
  </element>
</schema>


Columns

Columns describe this type in the STT and MTT transformations.

Columns
TagLabelTypeWidth
whenDateString50
caffeineCaffeineString100
alcoholAlcoholString100
napNapString100
exerciseExerciseString100
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