---
# System prepended metadata

title: Heart rate measurement version 2

---

@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dct:     <http://purl.org/dc/terms/> .
@prefix ncit:    <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> .
@prefix pav:     <http://purl.org/pav/> .
@prefix qudt:    <http://qudt.org/schema/qudt/> .
@prefix unit:    <http://qudt.org/vocab/unit/> .
@prefix mds:     <http://k.mdsol.com/s/> .
@prefix mdo:     <http://k.mdsol.com/o/> .
@prefix sh:      <http://www.w3.org/ns/shacl#> .

###################
### Shapes
###################

### Heart rate measurement version 1
mds:429746ec-f78f-11ec-b939-0242ac120001
    a              sh:NodeShape ;
    skos:prefLabel "Heart rate measurement"@en ;
    pav:createdOn "2022-06-20T13:26:00"^^xsd:dateTime ;
    pav:version "1.0";
    dct:references ncit:C49677 ;
    sh:property
            mds:429748b8-f78f-11ec-b939-0242ac120a0, # AssessmentDate
            mds:429748b8-f78f-11ec-b939-0242ac120b0, # BodyPosition
            mds:429748b8-f78f-11ec-b939-0242ac120u0, # HeartRateMeasurementUnit
            mds:429748b8-f78f-11ec-b939-0242ac120v0 # HeartRateMeasurementValue
.


mds:429748b8-f78f-11ec-b939-0242ac120a0     # AssessmentDate
    a              sh:PropertyShape ;
    skos:prefLabel "Assessment date"@en ;
    pav:createdOn "2022-06-20T13:26:00"^^xsd:dateTime ;
    pav:version "1.0";
    dct:references ncit:C93511 ;
    sh:path        mdo:assessmentDate ;
    sh:datatype    xsd:dateTime ;
    sh:minCount    1 ;
    sh:maxCount    1 .



mds:429748b8-f78f-11ec-b939-0242ac120b0  # BodyPosition
    a              sh:PropertyShape ;
    skos:prefLabel "Body position"@en ;
    pav:createdOn "2022-06-20T13:26:00"^^xsd:dateTime ;
    pav:version "1.0";
    dct:references ncit:C62164 ;
    sh:path        mdo:bodyPosition ;
    sh:in          ( "STANDING" "SITTING")
.


mds:429748b8-f78f-11ec-b939-0242ac120u0 # HeartRateMeasurementUnit
    a              sh:PropertyShape ;
    skos:prefLabel "Heart rate measurement unit"@en ;
    pav:createdOn "2022-06-20T13:26:00"^^xsd:dateTime ;
    pav:version "1.0";
    sh:path        qudt:unit ;
    sh:minCount    1 ;
    sh:maxCount    1 ;
    sh:hasValue    unit:BEAT-PER-MIN .


mds:429748b8-f78f-11ec-b939-0242ac120v0 # HeartRateMeasurementValue
    a               sh:PropertyShape ;
    skos:prefLabel  "Heart rate measurement value"@en ;
    pav:createdOn "2022-06-20T13:26:00"^^xsd:dateTime ;
    pav:version "1.0";
    sh:path         qudt:value ;
    sh:datatype     xsd:integer ;
    sh:minCount     1 ;
    sh:maxCount     1 ;
    sh:minExclusive 0 .



###################################
# Heart rate measurement version 2
# we change the body position values so we create a new revision for both the property shape and the node shape
###################################
mds:429746ec-f78f-11ec-b939-0242ac120002
    a              sh:NodeShape ;
    skos:prefLabel "Heart rate measurement"@en ;
    pav:hasPreviousVersion mds:429746ec-f78f-11ec-b939-0242ac120001 ;
    pav:createdOn "2022-06-28T13:26:38"^^xsd:dateTime ;
    pav:version "2.0";
    dct:references ncit:C49677 ;
    sh:property
                   mds:429748b8-f78f-11ec-b939-0242ac120a0, # AssessmentDate (unchanged, we point to the previous version)
                   mds:429748b8-f78f-11ec-b939-0242ac120b2, # BodyPosition v2
                   mds:429748b8-f78f-11ec-b939-0242ac120u0, # HeartRateMeasurementUnit (unchanged, we point to the previous version)
                   mds:429748b8-f78f-11ec-b939-0242ac120v0 # HeartRateMeasurementValue (unchanged, we point to the previous version)
.

mds:429748b8-f78f-11ec-b939-0242ac120b2  # BodyPosition v2, added LYING position
    a              sh:PropertyShape ;
    skos:prefLabel "Body position"@en ;
    pav:hasPreviousVersion mds:429746ec-f78f-11ec-b939-0242ac120b0 ;
    pav:createdOn "2022-06-28T13:26:38"^^xsd:dateTime ;
    pav:version "2.0";
    dct:references ncit:C62164 ;
    sh:path        mdo:bodyPosition ;
    sh:in          ( "STANDING" "SITTING" "LYING")
.


#########################
### Root IRI metadata
#########################

### Root "Heart rate measurement" Concept IRI, points to all versions and the current one
mds:429746ec-f78f-11ec-b939-0242ac120000
    pav:createdOn "2022-06-20T13:26:38"^^xsd:dateTime ; # same as the createdOn of the first version
    pav:hasVersion mds:429746ec-f78f-11ec-b939-0242ac120001 ;
    pav:hasVersion mds:429746ec-f78f-11ec-b939-0242ac120002 ;
    pav:hasCurrenthasVersion mds:429746ec-f78f-11ec-b939-0242ac120002 ;
.

mds:429746ec-f78f-11ec-b939-0242ac120Aa0 # root IRI for AssessmentDate
    pav:createdOn "2022-06-20T13:26:38"^^xsd:dateTime ;
    pav:hasVersion mds:429748b8-f78f-11ec-b939-0242ac120a0 ;
    pav:hasCurrenthasVersion mds:429746ec-f78f-11ec-b939-0242ac120a0 ;
.

mds:429746ec-f78f-11ec-b939-0242ac12Bb0 # root IRI for BodyPosition
    pav:createdOn "2022-06-20T13:26:38"^^xsd:dateTime ;
    pav:hasVersion mds:429748b8-f78f-11ec-b939-0242ac120b0 ;
    pav:hasVersion mds:429748b8-f78f-11ec-b939-0242ac120b2 ;
    pav:hasCurrenthasVersion mds:429748b8-f78f-11ec-b939-0242ac120b0 ;
.

mds:429748b8-f78f-11ec-b939-0242ac12Uu0 # root IRI for HeartRateMeasurementUnit
    pav:createdOn "2022-06-20T13:26:38"^^xsd:dateTime ;
    pav:hasVersion mds:429748b8-f78f-11ec-b939-0242ac120u0 ;
    pav:hasCurrenthasVersion mds:429748b8-f78f-11ec-b939-0242ac120u0 ;
.

mds:429748b8-f78f-11ec-b939-0242ac12Vv0 # root IRI for HeartRateMeasurementUnit
    pav:createdOn "2022-06-20T13:26:38"^^xsd:dateTime ;
    pav:hasVersion mds:429748b8-f78f-11ec-b939-0242ac120v0 ;
    pav:hasCurrenthasVersion mds:429748b8-f78f-11ec-b939-0242ac120v0 ;
.

