<commit_before>Grammar:		DataElement 5.0
Namespace:		shr.core


CodeSystem:     LNC = http://loinc.org
CodeSystem:		UCUM = http://unitsofmeasure.org
CodeSystem: 	OBSCAT = http://hl7.org/fhir/observation-category

//----------------Vital Sign Panel----------------

EntryElement:	VitalSignsPanel
Based on:	NonLaboratoryObservation
Description: "A summary of vital signs, including weight, height (or length), blood pressure, respiration rate, oxygen saturation, heart rate, and body temperature, BMI, and (optionally) head circumference. Each member of the panel is treated as a separate, independent observation. The panel is a grouping for convenience so all vitals can be retrieved using one LOINC code (85353-1)."
		Code is LNC#85353-1 "Vital signs, weight, height, head circumference, oxygen saturation and BMI panel"
1..1    SubjectOfRecord is type PatientSubjectOfRecord
0..0	DataValue
0..0	BodyLocation
0..0	Method
0..0	Device
0..0	ReferenceRange
0..0	Components
		PanelMembers.Observation
includes 0..1 BodyHeight
includes 0..1 BodyWeight
includes 0..1 BloodPressure
includes 0..1 RespiratoryRate
includes 0..1 HeartRate
includes 0..1 OxygenSaturation
includes 0..1 BodyTemperature
includes 0..1 BodyLength
includes 0..1 HeadCircumference
includes 0..1 BodyMassIndex

//------------------ Vital Sign ---------------------------

Abstract Element:  VitalSign
Based on:		QuantitativeNonLaboratoryObservation
Description:	"Abstract class parent for all vital sign profiles."
1..1			Category is OBSCAT#vital-signs
1..1			SubjectOfRecord is type PatientSubjectOfRecord
0..*			Precondition
0..0			BodyLocation.Laterality // zeroed out because we are using pre-coordinated body site codes to describe body locations associated with vital signs
0..0			BodyLocation.Orientation
0..0			BodyLocation.RelationToLandmark
0..0			PanelMembers
0..0			Device

		Element:		Precondition
		Description:	"A description of the conditions or context of an observation, for example, under sedation, fasting or post-exercise. A qualifier cannot modify the measurement type; for example, a fasting blood sugar is still a blood sugar. "
		Value:			CodeableConcept

/*		Element:		DeviceType
		Description:	"The type of device used to make the measurement, expressed as a code. If a specific device is to be recorded, use Device."
		Value:			CodeableConcept
*/

EntryElement:	BodyWeight
Based on:		VitalSign
Description:	"Data structure for recording the body weight, defined as the mass or quantity of heaviness of the individual."
				Code is LNC#29463-7  "Body weight" // CIMI uses 3141-9 "Body weight Measured" but Argonaut, US-Core, and FHIR R4 all use 29462-7
				DataValue.Quantity.Units from BodyWeightUnitsVS
				Precondition from BodyWeightPreconditionVS if covered
				Method from BodyWeightMethodVS if covered
0..0			BodyLocation
0..0			Components

EntryElement:	BodyHeight
Based on:		VitalSign
Description:	"Data structure for recording the body height, defined as the distance from the sole to the crown of the head."
				Code is LNC#8302-2 "Body height"
				DataValue.Quantity.Units from BodyHeightLengthUnitsVS
				Precondition from BodyHeightPreconditionVS if covered
				Method from BodyHeightLengthMethodVS if covered
0..1			BodyPosition
0..0			BodyLocation
0..0			Components

	Element:		BodyPosition
	Description:	"The position or physical attitude of the body."
	Value:			CodeableConcept from BodyPositionVS if covered

EntryElement:	BodyLength
Based on:		VitalSign
Description:	"The distance from the sole of the foot to the crown of the head, lying down (typically 0-2 years)."
				Code is LNC#8306-3 "Body length"
				DataValue.Quantity.Units is UCUM#cm "cm"
0..0			Precondition
				Method from BodyHeightLengthMethodVS
0..1			BodyPosition
0..0			BodyLocation
0..0			Components

EntryElement:	BloodPressure  // Implemented with components
Based on:		VitalSign
Description:	"The force of circulating blood on the walls of the arteries."
				Code is LNC#55284-4 "Blood pressure systolic and diastolic"
0..0			DataValue
0..0			DataAbsentReason
				BodyLocation.LocationCode from BloodPressureBodyLocationVS if covered
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from BloodPressureMethodVS if covered
				Components.ObservationComponent
includes 0..1 	SystolicPressure 
includes 0..1 	DiastolicPressure
0..1			BodyPosition
0..1			BloodPressureCuffSize

	Element:		SystolicPressure
	Based on:		QuantitativeObservationComponent
	Description:	"The blood pressure during the contraction of the left ventricle of the heart, when blood pressure is at its highest."
					Code is LNC#8480-6
					DataValue.Quantity.Units is UCUM#mm[Hg] "mmHg"

	Element:		DiastolicPressure
	Based on:		QuantitativeObservationComponent
	Description:	"The blood pressure after the contraction of the heart while the chambers of the heart refill with blood, when the pressure is lowest."
					Code is LNC#8462-4
					DataValue.Quantity.Units is UCUM#mm[Hg] "mmHg"

	Element:		BloodPressureCuffSize
	Description:	"The size of cuff used, if applicable."
	Value:			CodeableConcept from BloodPressureCuffSizeVS

EntryElement:	RespiratoryRate
Based on:		VitalSign
Description:	"The rate of breathing (inhalation and exhalation) measured within in a unit time, expressed as breaths per minute."
				Code is LNC#9279-1 "Respiratory rate"
				DataValue.Quantity.Units is UCUM#/min "{breaths}/min"
0..0			BodyLocation
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from RespiratoryRateMethodVS if covered
				Components.ObservationComponent
0..1			BodyPosition
0..0			Components

EntryElement:	HeartRate
Based on:		VitalSign
Concept:		LNC#8867-4
Description:	"The number of times the heart ventricles contract per unit of time, usually per minute."
				Code is LNC#8867-4 "Heart rate"
				DataValue.Quantity.Units is UCUM#/min "/min"
				BodyLocation.LocationCode from HeartRateBodyLocationVS if covered
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from HeartRateMethodVS if covered
0..0			Components

EntryElement:	OxygenSaturation
Based on:		VitalSign
Description:	"Oxygen saturation in Arterial blood by Pulse oximetry."
// Argo, US Core and CIMI use LNC#59408-5 "Oxygen saturation in Arterial blood by Pulse oximetry" but FHIR R4 changes to 2708-6 "Oxygen saturation in Arterial blood" (latter code doesn't presume a method).
				Code is LNC#59408-5 "Oxygen saturation in Arterial blood by Pulse oximetry"
				DataValue.Quantity.Units is UCUM#% "%"
				BodyLocation.LocationCode from OxygenSaturationBodyLocationVS
				Precondition from CardiopulmonaryPreconditionVS
				Method from OxygenSaturationMethodVS
				Components.ObservationComponent
	includes	0..1	SupplementalOxygenFlowrate
	includes	0..1	SupplementalOxygenConcentration

	Element:	SupplementalOxygenFlowrate
	Based on:	QuantitativeObservationComponent
	Description: "Oxygen gas flow rate delivered to subject during oxygen therapy"
				Code is LNC#19941-4 "Oxygen gas flow Oxygen delivery system"
				DataValue.Quantity.Units is UCUM#L/min "L/min"

	Element:	SupplementalOxygenConcentration
	Based on:	QuantitativeObservationComponent
	Description: "Percentage of oxygen delivered to subject during oxygen therapy"
				Code is LNC#3150-0 "Inhaled oxygen concentration"
				DataValue.Quantity.Units is UCUM#% "%"
	
EntryElement:	BodyTemperature
Based on:		VitalSign
Description:	"The measure of the level of heat in the body."
				Code is LNC#8310-5 "Body temperature"
				DataValue.Quantity.Units is UCUM#Cel "C"
				BodyLocation.LocationCode from BodyTemperatureBodyLocationVS
//				Precondition from BodyTemperatureQualifierVS
				Method from BodyTemperatureMethodVS
0..0			Components

EntryElement:	HeadCircumference
Based on:		VitalSign
Description:	"Circumference of the head (typically 0-2 years)."
				Code is LNC#8287-5 "Head Occipital-frontal circumference by Tape measure"
				DataValue.Quantity.Units is UCUM#cm "cm"
0..0			Precondition
0..0			Method
0..0			BodyLocation
0..0			Components
0..0			Device

EntryElement:	BodyMassIndex
Based on:		VitalSign
Description:	"A general indicator of the body fat an individual is carrying based upon the ratio of weight to height."
				Code is LNC#39156-5 "Body mass index (BMI) [Ratio]"
				DataValue.Quantity.Units is UCUM#kg/m2  "kg/m2"
0..0			Precondition
0..0			Method
0..0			BodyLocation
0..0			Components
0..0			Device


/*
	Element: 		HeadTiltAngle // This is only used during a tilt table test.
	Concept: 		LNC#8360-0
	Description:	"The angle at which the head is tilted relative to a level position while physiologic tests are taken."
	Value:			Quantity with units UCUM#deg "deg"
*/<commit_msg>Data values on Body Weight and Height should be required.<commit_after>Grammar:		DataElement 5.0
Namespace:		shr.core


CodeSystem:     LNC = http://loinc.org
CodeSystem:		UCUM = http://unitsofmeasure.org
CodeSystem: 	OBSCAT = http://hl7.org/fhir/observation-category

//----------------Vital Sign Panel----------------

EntryElement:	VitalSignsPanel
Based on:	NonLaboratoryObservation
Description: "A summary of vital signs, including weight, height (or length), blood pressure, respiration rate, oxygen saturation, heart rate, and body temperature, BMI, and (optionally) head circumference. Each member of the panel is treated as a separate, independent observation. The panel is a grouping for convenience so all vitals can be retrieved using one LOINC code (85353-1)."
		Code is LNC#85353-1 "Vital signs, weight, height, head circumference, oxygen saturation and BMI panel"
1..1    SubjectOfRecord is type PatientSubjectOfRecord
0..0	DataValue
0..0	BodyLocation
0..0	Method
0..0	Device
0..0	ReferenceRange
0..0	Components
		PanelMembers.Observation
includes 0..1 BodyHeight
includes 0..1 BodyWeight
includes 0..1 BloodPressure
includes 0..1 RespiratoryRate
includes 0..1 HeartRate
includes 0..1 OxygenSaturation
includes 0..1 BodyTemperature
includes 0..1 BodyLength
includes 0..1 HeadCircumference
includes 0..1 BodyMassIndex

//------------------ Vital Sign ---------------------------

Abstract Element:  VitalSign
Based on:		QuantitativeNonLaboratoryObservation
Description:	"Abstract class parent for all vital sign profiles."
1..1			Category is OBSCAT#vital-signs
1..1			SubjectOfRecord is type PatientSubjectOfRecord
0..*			Precondition
0..0			BodyLocation.Laterality // zeroed out because we are using pre-coordinated body site codes to describe body locations associated with vital signs
0..0			BodyLocation.Orientation
0..0			BodyLocation.RelationToLandmark
0..0			PanelMembers
0..0			Device

		Element:		Precondition
		Description:	"A description of the conditions or context of an observation, for example, under sedation, fasting or post-exercise. A qualifier cannot modify the measurement type; for example, a fasting blood sugar is still a blood sugar. "
		Value:			CodeableConcept

/*		Element:		DeviceType
		Description:	"The type of device used to make the measurement, expressed as a code. If a specific device is to be recorded, use Device."
		Value:			CodeableConcept
*/

EntryElement:	BodyWeight
Based on:		VitalSign
Description:	"Data structure for recording the body weight, defined as the mass or quantity of heaviness of the individual."
				Code is LNC#29463-7  "Body weight" // CIMI uses 3141-9 "Body weight Measured" but Argonaut, US-Core, and FHIR R4 all use 29462-7
1..1			DataValue
				DataValue.Quantity.Units from BodyWeightUnitsVS
				Precondition from BodyWeightPreconditionVS if covered
				Method from BodyWeightMethodVS if covered
0..0			BodyLocation
0..0			Components

EntryElement:	BodyHeight
Based on:		VitalSign
Description:	"Data structure for recording the body height, defined as the distance from the sole to the crown of the head."
				Code is LNC#8302-2 "Body height"
1..1			DataValue
				DataValue.Quantity.Units from BodyHeightLengthUnitsVS
				Precondition from BodyHeightPreconditionVS if covered
				Method from BodyHeightLengthMethodVS if covered
0..1			BodyPosition
0..0			BodyLocation
0..0			Components

	Element:		BodyPosition
	Description:	"The position or physical attitude of the body."
	Value:			CodeableConcept from BodyPositionVS if covered

EntryElement:	BodyLength
Based on:		VitalSign
Description:	"The distance from the sole of the foot to the crown of the head, lying down (typically 0-2 years)."
				Code is LNC#8306-3 "Body length"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#cm "cm"
0..0			Precondition
				Method from BodyHeightLengthMethodVS
0..1			BodyPosition
0..0			BodyLocation
0..0			Components

EntryElement:	BloodPressure  // Implemented with components
Based on:		VitalSign
Description:	"The force of circulating blood on the walls of the arteries."
				Code is LNC#55284-4 "Blood pressure systolic and diastolic"
0..0			DataValue
0..0			DataAbsentReason
				BodyLocation.LocationCode from BloodPressureBodyLocationVS if covered
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from BloodPressureMethodVS if covered
				Components.ObservationComponent
includes 0..1 	SystolicPressure 
includes 0..1 	DiastolicPressure
0..1			BodyPosition
0..1			BloodPressureCuffSize

	Element:		SystolicPressure
	Based on:		QuantitativeObservationComponent
	Description:	"The blood pressure during the contraction of the left ventricle of the heart, when blood pressure is at its highest."
					Code is LNC#8480-6
					DataValue.Quantity.Units is UCUM#mm[Hg] "mmHg"

	Element:		DiastolicPressure
	Based on:		QuantitativeObservationComponent
	Description:	"The blood pressure after the contraction of the heart while the chambers of the heart refill with blood, when the pressure is lowest."
					Code is LNC#8462-4
					DataValue.Quantity.Units is UCUM#mm[Hg] "mmHg"

	Element:		BloodPressureCuffSize
	Description:	"The size of cuff used, if applicable."
	Value:			CodeableConcept from BloodPressureCuffSizeVS

EntryElement:	RespiratoryRate
Based on:		VitalSign
Description:	"The rate of breathing (inhalation and exhalation) measured within in a unit time, expressed as breaths per minute."
				Code is LNC#9279-1 "Respiratory rate"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#/min "{breaths}/min"
0..0			BodyLocation
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from RespiratoryRateMethodVS if covered
				Components.ObservationComponent
0..1			BodyPosition
0..0			Components

EntryElement:	HeartRate
Based on:		VitalSign
Concept:		LNC#8867-4
Description:	"The number of times the heart ventricles contract per unit of time, usually per minute."
				Code is LNC#8867-4 "Heart rate"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#/min "/min"
				BodyLocation.LocationCode from HeartRateBodyLocationVS if covered
				Precondition from CardiopulmonaryPreconditionVS if covered
				Method from HeartRateMethodVS if covered
0..0			Components

EntryElement:	OxygenSaturation
Based on:		VitalSign
Description:	"Oxygen saturation in Arterial blood by Pulse oximetry."
// Argo, US Core and CIMI use LNC#59408-5 "Oxygen saturation in Arterial blood by Pulse oximetry" but FHIR R4 changes to 2708-6 "Oxygen saturation in Arterial blood" (latter code doesn't presume a method).
				Code is LNC#59408-5 "Oxygen saturation in Arterial blood by Pulse oximetry"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#% "%"
				BodyLocation.LocationCode from OxygenSaturationBodyLocationVS
				Precondition from CardiopulmonaryPreconditionVS
				Method from OxygenSaturationMethodVS
				Components.ObservationComponent
	includes	0..1	SupplementalOxygenFlowrate
	includes	0..1	SupplementalOxygenConcentration

	Element:	SupplementalOxygenFlowrate
	Based on:	QuantitativeObservationComponent
	Description: "Oxygen gas flow rate delivered to subject during oxygen therapy"
				Code is LNC#19941-4 "Oxygen gas flow Oxygen delivery system"
				DataValue.Quantity.Units is UCUM#L/min "L/min"

	Element:	SupplementalOxygenConcentration
	Based on:	QuantitativeObservationComponent
	Description: "Percentage of oxygen delivered to subject during oxygen therapy"
				Code is LNC#3150-0 "Inhaled oxygen concentration"
				DataValue.Quantity.Units is UCUM#% "%"
	
EntryElement:	BodyTemperature
Based on:		VitalSign
Description:	"The measure of the level of heat in the body."
				Code is LNC#8310-5 "Body temperature"
				DataValue.Quantity.Units is UCUM#Cel "C"
				BodyLocation.LocationCode from BodyTemperatureBodyLocationVS
//				Precondition from BodyTemperatureQualifierVS
				Method from BodyTemperatureMethodVS
0..0			Components

EntryElement:	HeadCircumference
Based on:		VitalSign
Description:	"Circumference of the head (typically 0-2 years)."
				Code is LNC#8287-5 "Head Occipital-frontal circumference by Tape measure"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#cm "cm"
0..0			Precondition
0..0			Method
0..0			BodyLocation
0..0			Components
0..0			Device

EntryElement:	BodyMassIndex
Based on:		VitalSign
Description:	"A general indicator of the body fat an individual is carrying based upon the ratio of weight to height."
				Code is LNC#39156-5 "Body mass index (BMI) [Ratio]"
1..1			DataValue
				DataValue.Quantity.Units is UCUM#kg/m2  "kg/m2"
0..0			Precondition
0..0			Method
0..0			BodyLocation
0..0			Components
0..0			Device


/*
	Element: 		HeadTiltAngle // This is only used during a tilt table test.
	Concept: 		LNC#8360-0
	Description:	"The angle at which the head is tilted relative to a level position while physiologic tests are taken."
	Value:			Quantity with units UCUM#deg "deg"
*/
{'fraction_non_alphanumeric': 0.0692351598173516, 'fraction_numerical': 0.02865296803652968, 'mean_word_length': 4.082970699158689, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6309029', 'n_tokens_mistral': 5921, 'n_tokens_neox': 5117, 'n_words': 1955}