{"resourceType":"StructureDefinition","id":"cycle-log-custom-interval","url":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval","version":"0.1.0","name":"CycleLogCustomInterval","title":"Custom interval","status":"draft","experimental":true,"description":"Any coded state over a range of days, under a code that is not built in and not a vital sign. Closed: every element not listed is max 0. Generated from the cycle-log model (codecs/cycle-log/profiles/make-profiles.ts).","fhirVersion":"4.0.1","kind":"resource","abstract":false,"type":"Observation","baseDefinition":"http://hl7.org/fhir/StructureDefinition/Observation","derivation":"constraint","differential":{"element":[{"id":"Observation","path":"Observation","constraint":[{"key":"cy-cc","severity":"error","human":"Every CodeableConcept carries a coding, text, or both.","expression":"descendants().ofType(CodeableConcept).all(coding.exists() or text.exists())","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"key":"cy-coding","severity":"error","human":"Every coding is a concept key the model can hold: an absolute URI system of printable ASCII without \"|\" (at most 255 characters), a code of at most 128 characters with single spaces only between non-space characters and no control characters, and for SNOMED CT a concept-id shaped code (6-18 digits, partition 00 or 10; the check digit is not tested).","expression":"descendants().ofType(Coding).all(system.matches('^[A-Za-z][A-Za-z0-9+.-]*:[!-{}~]+$') and system.matches('^.{1,255}$') and code.matches('^[^\\\\s\\\\x00-\\\\x1f\\\\x7f]+( [^\\\\s\\\\x00-\\\\x1f\\\\x7f]+)*$') and code.matches('^.{1,128}$') and (system != 'http://snomed.info/sct' or code.matches('^[1-9][0-9]{2,14}[01]0[0-9]$')))","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"key":"cy-label","severity":"error","human":"An escape coding display (not fixed by its position) or CodeableConcept text is allowed only on non-built-in concepts (or text-only concepts), with no leading or trailing whitespace, no control characters and at most 128 characters.","expression":"descendants().ofType(Coding).where(display.exists() and ((system & '|' & code & '|' & display) in ('https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-bleeding|Menstrual bleeding' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-flow|Patient-reported menstrual flow category' | 'http://loinc.org|72514-3|Pain severity - 0-10 verbal numeric rating [Score] - Reported' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|symptom|Symptom' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|basal-body-temperature|Basal body temperature' | 'http://terminology.hl7.org/CodeSystem/observation-category|vital-signs|Vital Signs' | 'http://terminology.hl7.org/CodeSystem/v3-ObservationValue|SUBSETTED|subsetted')).not()).all(((system & '|' & code) in ('http://loinc.org|2106-3' | 'http://loinc.org|63888-2' | 'http://loinc.org|63889-0' | 'http://loinc.org|63895-7' | 'http://loinc.org|64700-8' | 'http://loinc.org|64701-6' | 'http://loinc.org|64702-4' | 'http://loinc.org|65930-0' | 'http://loinc.org|72514-3' | 'http://loinc.org|82810-3' | 'http://loinc.org|8659-5' | 'http://loinc.org|92656-8' | 'http://loinc.org|93832-4' | 'http://loinc.org|LA12688-0' | 'http://loinc.org|LA12693-0' | 'http://loinc.org|LA137-2' | 'http://loinc.org|LA14649-0' | 'http://loinc.org|LA14650-8' | 'http://loinc.org|LA14651-6' | 'http://loinc.org|LA14652-4' | 'http://loinc.org|LA14653-2' | 'http://loinc.org|LA14654-0' | 'http://loinc.org|LA14655-7' | 'http://loinc.org|LA14656-5' | 'http://loinc.org|LA14657-3' | 'http://loinc.org|LA15173-0' | 'http://loinc.org|LA16581-3' | 'http://loinc.org|LA27901-0' | 'http://loinc.org|LA27902-8' | 'http://loinc.org|LA27903-6' | 'http://loinc.org|LA27904-4' | 'http://loinc.org|LA27907-7' | 'http://loinc.org|LA27908-5' | 'http://loinc.org|LA27909-3' | 'http://loinc.org|LA27911-9' | 'http://loinc.org|LA27912-7' | 'http://loinc.org|LA27918-4' | 'http://loinc.org|LA27919-2' | 'http://loinc.org|LA29252-6' | 'http://loinc.org|LA32-8' | 'http://loinc.org|LA33-6' | 'http://snomed.info/sct|10828004' | 'http://snomed.info/sct|109006003' | 'http://snomed.info/sct|11381005' | 'http://snomed.info/sct|11401008' | 'http://snomed.info/sct|116289008' | 'http://snomed.info/sct|11847009' | 'http://snomed.info/sct|1237359009' | 'http://snomed.info/sct|1263416007' | 'http://snomed.info/sct|128105004' | 'http://snomed.info/sct|129103003' | 'http://snomed.info/sct|1372819003' | 'http://snomed.info/sct|14760008' | 'http://snomed.info/sct|161541000119104' | 'http://snomed.info/sct|161891005' | 'http://snomed.info/sct|165232002' | 'http://snomed.info/sct|169553002' | 'http://snomed.info/sct|18963009' | 'http://snomed.info/sct|193462001' | 'http://snomed.info/sct|225038006' | 'http://snomed.info/sct|2314005' | 'http://snomed.info/sct|236884004' | 'http://snomed.info/sct|236886002' | 'http://snomed.info/sct|237055002' | 'http://snomed.info/sct|237120002' | 'http://snomed.info/sct|237662005' | 'http://snomed.info/sct|237788002' | 'http://snomed.info/sct|248132003' | 'http://snomed.info/sct|25064002' | 'http://snomed.info/sct|260385009' | 'http://snomed.info/sct|265060005' | 'http://snomed.info/sct|271681002' | 'http://snomed.info/sct|279039007' | 'http://snomed.info/sct|289532003' | 'http://snomed.info/sct|301807007' | 'http://snomed.info/sct|30473006' | 'http://snomed.info/sct|30729008' | 'http://snomed.info/sct|312138002' | 'http://snomed.info/sct|31908003' | 'http://snomed.info/sct|34364009' | 'http://snomed.info/sct|34486009' | 'http://snomed.info/sct|364316005' | 'http://snomed.info/sct|366979004' | 'http://snomed.info/sct|37796009' | 'http://snomed.info/sct|38268001' | 'http://snomed.info/sct|404640003' | 'http://snomed.info/sct|40930008' | 'http://snomed.info/sct|42010004' | 'http://snomed.info/sct|422587007' | 'http://snomed.info/sct|42984000' | 'http://snomed.info/sct|431416001' | 'http://snomed.info/sct|43548008' | 'http://snomed.info/sct|48694002' | 'http://snomed.info/sct|53430007' | 'http://snomed.info/sct|55222007' | 'http://snomed.info/sct|55929007' | 'http://snomed.info/sct|56317004' | 'http://snomed.info/sct|58436003' | 'http://snomed.info/sct|62315008' | 'http://snomed.info/sct|6247001' | 'http://snomed.info/sct|63537005' | 'http://snomed.info/sct|64779008' | 'http://snomed.info/sct|65200003' | 'http://snomed.info/sct|70256003' | 'http://snomed.info/sct|71315007' | 'http://snomed.info/sct|73595000' | 'http://snomed.info/sct|76498008' | 'http://snomed.info/sct|76876009' | 'http://snomed.info/sct|784314006' | 'http://snomed.info/sct|80313002' | 'http://snomed.info/sct|82334004' | 'http://snomed.info/sct|83152002' | 'http://snomed.info/sct|8357008' | 'http://snomed.info/sct|84229001' | 'http://snomed.info/sct|87522002' | 'http://snomed.info/sct|90332006' | 'http://snomed.info/sct|95315005' | 'http://terminology.hl7.org/CodeSystem/observation-category|vital-signs' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|basal-body-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|cervical-mucus' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|contraceptive-pill-taken' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-energized' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-exhausted' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-high' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-level' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-low' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|estrogen-surge' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-alcohol' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-fever' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-late-wake' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-medication' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-other' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-poor-sleep' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-stress' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-travel' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-heavy' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-light' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-moderate' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-none' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-spotting' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|hot-flash' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-bleeding' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-flow' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-fluid-volume' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mood-valence' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-creamy' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-dry' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-egg-white' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-sticky' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-watery' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|nightly-skin-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|no-sexual-intercourse' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|ovulation-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|pdg-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|reading-excluded' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|reading-exclusion-reason' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|skin-temperature-deviation' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|symptom' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-neutral' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-slightly-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-slightly-unpleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-unpleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-very-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-very-unpleasant')).not() and display.matches('^[^\\\\s\\\\u00a0\\\\u1680\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000\\\\ufeff\\\\x00-\\\\x1f\\\\x7f]([^\\\\x00-\\\\x1f\\\\x7f]{0,126}[^\\\\s\\\\u00a0\\\\u1680\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000\\\\ufeff\\\\x00-\\\\x1f\\\\x7f])?$')) and descendants().ofType(CodeableConcept).where(text.exists()).all(text.matches('^[^\\\\s\\\\u00a0\\\\u1680\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000\\\\ufeff\\\\x00-\\\\x1f\\\\x7f]([^\\\\x00-\\\\x1f\\\\x7f]{0,126}[^\\\\s\\\\u00a0\\\\u1680\\\\u2000-\\\\u200a\\\\u2028\\\\u2029\\\\u202f\\\\u205f\\\\u3000\\\\ufeff\\\\x00-\\\\x1f\\\\x7f])?$') and (coding.empty() or ((coding.system & '|' & coding.code) in ('http://loinc.org|2106-3' | 'http://loinc.org|63888-2' | 'http://loinc.org|63889-0' | 'http://loinc.org|63895-7' | 'http://loinc.org|64700-8' | 'http://loinc.org|64701-6' | 'http://loinc.org|64702-4' | 'http://loinc.org|65930-0' | 'http://loinc.org|72514-3' | 'http://loinc.org|82810-3' | 'http://loinc.org|8659-5' | 'http://loinc.org|92656-8' | 'http://loinc.org|93832-4' | 'http://loinc.org|LA12688-0' | 'http://loinc.org|LA12693-0' | 'http://loinc.org|LA137-2' | 'http://loinc.org|LA14649-0' | 'http://loinc.org|LA14650-8' | 'http://loinc.org|LA14651-6' | 'http://loinc.org|LA14652-4' | 'http://loinc.org|LA14653-2' | 'http://loinc.org|LA14654-0' | 'http://loinc.org|LA14655-7' | 'http://loinc.org|LA14656-5' | 'http://loinc.org|LA14657-3' | 'http://loinc.org|LA15173-0' | 'http://loinc.org|LA16581-3' | 'http://loinc.org|LA27901-0' | 'http://loinc.org|LA27902-8' | 'http://loinc.org|LA27903-6' | 'http://loinc.org|LA27904-4' | 'http://loinc.org|LA27907-7' | 'http://loinc.org|LA27908-5' | 'http://loinc.org|LA27909-3' | 'http://loinc.org|LA27911-9' | 'http://loinc.org|LA27912-7' | 'http://loinc.org|LA27918-4' | 'http://loinc.org|LA27919-2' | 'http://loinc.org|LA29252-6' | 'http://loinc.org|LA32-8' | 'http://loinc.org|LA33-6' | 'http://snomed.info/sct|10828004' | 'http://snomed.info/sct|109006003' | 'http://snomed.info/sct|11381005' | 'http://snomed.info/sct|11401008' | 'http://snomed.info/sct|116289008' | 'http://snomed.info/sct|11847009' | 'http://snomed.info/sct|1237359009' | 'http://snomed.info/sct|1263416007' | 'http://snomed.info/sct|128105004' | 'http://snomed.info/sct|129103003' | 'http://snomed.info/sct|1372819003' | 'http://snomed.info/sct|14760008' | 'http://snomed.info/sct|161541000119104' | 'http://snomed.info/sct|161891005' | 'http://snomed.info/sct|165232002' | 'http://snomed.info/sct|169553002' | 'http://snomed.info/sct|18963009' | 'http://snomed.info/sct|193462001' | 'http://snomed.info/sct|225038006' | 'http://snomed.info/sct|2314005' | 'http://snomed.info/sct|236884004' | 'http://snomed.info/sct|236886002' | 'http://snomed.info/sct|237055002' | 'http://snomed.info/sct|237120002' | 'http://snomed.info/sct|237662005' | 'http://snomed.info/sct|237788002' | 'http://snomed.info/sct|248132003' | 'http://snomed.info/sct|25064002' | 'http://snomed.info/sct|260385009' | 'http://snomed.info/sct|265060005' | 'http://snomed.info/sct|271681002' | 'http://snomed.info/sct|279039007' | 'http://snomed.info/sct|289532003' | 'http://snomed.info/sct|301807007' | 'http://snomed.info/sct|30473006' | 'http://snomed.info/sct|30729008' | 'http://snomed.info/sct|312138002' | 'http://snomed.info/sct|31908003' | 'http://snomed.info/sct|34364009' | 'http://snomed.info/sct|34486009' | 'http://snomed.info/sct|364316005' | 'http://snomed.info/sct|366979004' | 'http://snomed.info/sct|37796009' | 'http://snomed.info/sct|38268001' | 'http://snomed.info/sct|404640003' | 'http://snomed.info/sct|40930008' | 'http://snomed.info/sct|42010004' | 'http://snomed.info/sct|422587007' | 'http://snomed.info/sct|42984000' | 'http://snomed.info/sct|431416001' | 'http://snomed.info/sct|43548008' | 'http://snomed.info/sct|48694002' | 'http://snomed.info/sct|53430007' | 'http://snomed.info/sct|55222007' | 'http://snomed.info/sct|55929007' | 'http://snomed.info/sct|56317004' | 'http://snomed.info/sct|58436003' | 'http://snomed.info/sct|62315008' | 'http://snomed.info/sct|6247001' | 'http://snomed.info/sct|63537005' | 'http://snomed.info/sct|64779008' | 'http://snomed.info/sct|65200003' | 'http://snomed.info/sct|70256003' | 'http://snomed.info/sct|71315007' | 'http://snomed.info/sct|73595000' | 'http://snomed.info/sct|76498008' | 'http://snomed.info/sct|76876009' | 'http://snomed.info/sct|784314006' | 'http://snomed.info/sct|80313002' | 'http://snomed.info/sct|82334004' | 'http://snomed.info/sct|83152002' | 'http://snomed.info/sct|8357008' | 'http://snomed.info/sct|84229001' | 'http://snomed.info/sct|87522002' | 'http://snomed.info/sct|90332006' | 'http://snomed.info/sct|95315005' | 'http://terminology.hl7.org/CodeSystem/observation-category|vital-signs' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|basal-body-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|cervical-mucus' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|contraceptive-pill-taken' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-energized' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-exhausted' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-high' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-level' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-low' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|estrogen-surge' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-alcohol' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-fever' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-late-wake' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-medication' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-other' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-poor-sleep' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-stress' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|exclude-travel' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-heavy' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-light' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-moderate' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-none' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|flow-spotting' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|hot-flash' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-bleeding' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-flow' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-fluid-volume' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mood-valence' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-creamy' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-dry' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-egg-white' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-sticky' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mucus-watery' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|nightly-skin-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|no-sexual-intercourse' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|ovulation-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|pdg-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|reading-excluded' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|reading-exclusion-reason' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|skin-temperature-deviation' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|symptom' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-neutral' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-slightly-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-slightly-unpleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-unpleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-very-pleasant' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|valence-very-unpleasant')).not()))","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"key":"cy-day","severity":"error","human":"Every date of a Period is a calendar day YYYY-MM-DD, without a time.","expression":"effective.ofType(dateTime).all(toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) and effective.ofType(Period).all(start.toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$') and end.toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$'))","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"key":"cy-not-reserved","severity":"error","human":"A custom series or custom interval does not use a built-in series code or a screening question's code (those facts are carried by the built-in).","expression":"(iif(code.coding.exists(), code.coding.system & '|' & code.coding.code, '|' & code.text) in ('http://loinc.org|2106-3' | 'http://loinc.org|63888-2' | 'http://loinc.org|63889-0' | 'http://loinc.org|63895-7' | 'http://loinc.org|64700-8' | 'http://loinc.org|64701-6' | 'http://loinc.org|64702-4' | 'http://loinc.org|65930-0' | 'http://loinc.org|72514-3' | 'http://loinc.org|82810-3' | 'http://loinc.org|8659-5' | 'http://loinc.org|92656-8' | 'http://loinc.org|93832-4' | 'http://snomed.info/sct|364316005' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|basal-body-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|cervical-mucus' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|contraceptive-pill-taken' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|energy-level' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-bleeding' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-flow' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|menstrual-fluid-volume' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|mood-valence' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|nightly-skin-temperature' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|ovulation-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|pdg-test' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|skin-temperature-deviation' | 'https://joshuamandel.com/shc2-poc/CodeSystem/cycle-log|symptom')).not()","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"key":"cy-interval-not-vital","severity":"error","human":"A custom interval does not use an R4 vital-sign code.","expression":"(iif(code.coding.exists(), code.coding.system & '|' & code.coding.code, '|' & code.text) in ('http://loinc.org|11291-2' | 'http://loinc.org|11328-2' | 'http://loinc.org|19224-5' | 'http://loinc.org|19840-8' | 'http://loinc.org|20564-1' | 'http://loinc.org|2708-6' | 'http://loinc.org|2709-4' | 'http://loinc.org|2710-2' | 'http://loinc.org|2713-6' | 'http://loinc.org|29463-7' | 'http://loinc.org|3137-7' | 'http://loinc.org|3138-5' | 'http://loinc.org|3141-9' | 'http://loinc.org|3142-7' | 'http://loinc.org|33438-3' | 'http://loinc.org|35094-2' | 'http://loinc.org|39156-5' | 'http://loinc.org|40443-4' | 'http://loinc.org|51733-4' | 'http://loinc.org|55284-4' | 'http://loinc.org|55425-3' | 'http://loinc.org|59408-5' | 'http://loinc.org|59417-6' | 'http://loinc.org|60834-9' | 'http://loinc.org|60835-6' | 'http://loinc.org|60836-4' | 'http://loinc.org|60838-0' | 'http://loinc.org|60955-2' | 'http://loinc.org|60978-4' | 'http://loinc.org|61009-7' | 'http://loinc.org|68999-2' | 'http://loinc.org|69000-8' | 'http://loinc.org|73795-7' | 'http://loinc.org|73799-9' | 'http://loinc.org|75292-3' | 'http://loinc.org|75539-7' | 'http://loinc.org|75987-8' | 'http://loinc.org|76010-8' | 'http://loinc.org|76011-6' | 'http://loinc.org|76170-0' | 'http://loinc.org|76171-8' | 'http://loinc.org|76172-6' | 'http://loinc.org|76270-8' | 'http://loinc.org|76278-1' | 'http://loinc.org|76476-1' | 'http://loinc.org|76477-9' | 'http://loinc.org|76534-7' | 'http://loinc.org|79348-9' | 'http://loinc.org|8287-5' | 'http://loinc.org|8302-2' | 'http://loinc.org|8306-3' | 'http://loinc.org|8308-9' | 'http://loinc.org|8309-7' | 'http://loinc.org|8310-5' | 'http://loinc.org|8328-7' | 'http://loinc.org|8329-5' | 'http://loinc.org|8330-3' | 'http://loinc.org|8331-1' | 'http://loinc.org|8332-9' | 'http://loinc.org|8333-7' | 'http://loinc.org|8334-5' | 'http://loinc.org|8350-1' | 'http://loinc.org|8351-9' | 'http://loinc.org|8459-0' | 'http://loinc.org|8462-4' | 'http://loinc.org|8478-0' | 'http://loinc.org|8480-6' | 'http://loinc.org|85353-1' | 'http://loinc.org|85354-9' | 'http://loinc.org|8867-4' | 'http://loinc.org|8886-4' | 'http://loinc.org|8889-8' | 'http://loinc.org|8890-6' | 'http://loinc.org|8891-4' | 'http://loinc.org|8892-2' | 'http://loinc.org|8893-0' | 'http://loinc.org|89270-3' | 'http://loinc.org|89276-0' | 'http://loinc.org|91371-5' | 'http://loinc.org|9279-1' | 'http://loinc.org|97549-0' | 'http://loinc.org|9843-4' | 'http://loinc.org|98657-0' | 'http://loinc.org|98663-8')).not()","source":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"}]},{"id":"Observation.meta.id","path":"Observation.meta.id","max":"0"},{"id":"Observation.meta.extension","path":"Observation.meta.extension","max":"0"},{"id":"Observation.meta.versionId","path":"Observation.meta.versionId","max":"0"},{"id":"Observation.meta.lastUpdated","path":"Observation.meta.lastUpdated","max":"0"},{"id":"Observation.meta.source","path":"Observation.meta.source","max":"0"},{"id":"Observation.meta.profile","path":"Observation.meta.profile","min":1,"max":"1","fixedCanonical":"https://joshuamandel.com/shc2-poc/StructureDefinition/cycle-log-custom-interval"},{"id":"Observation.meta.profile.id","path":"Observation.meta.profile.id","max":"0"},{"id":"Observation.meta.profile.extension","path":"Observation.meta.profile.extension","max":"0"},{"id":"Observation.meta.security","path":"Observation.meta.security","max":"0"},{"id":"Observation.meta.tag","path":"Observation.meta.tag","max":"0"},{"id":"Observation.implicitRules","path":"Observation.implicitRules","max":"0"},{"id":"Observation.language","path":"Observation.language","max":"0"},{"id":"Observation.text","path":"Observation.text","max":"0"},{"id":"Observation.contained","path":"Observation.contained","max":"0"},{"id":"Observation.extension","path":"Observation.extension","max":"0"},{"id":"Observation.modifierExtension","path":"Observation.modifierExtension","max":"0"},{"id":"Observation.identifier","path":"Observation.identifier","max":"0"},{"id":"Observation.basedOn","path":"Observation.basedOn","max":"0"},{"id":"Observation.partOf","path":"Observation.partOf","max":"0"},{"id":"Observation.status","path":"Observation.status","fixedCode":"final"},{"id":"Observation.status.id","path":"Observation.status.id","max":"0"},{"id":"Observation.status.extension","path":"Observation.status.extension","max":"0"},{"id":"Observation.category","path":"Observation.category","max":"0"},{"id":"Observation.code.id","path":"Observation.code.id","max":"0"},{"id":"Observation.code.extension","path":"Observation.code.extension","max":"0"},{"id":"Observation.code.coding","path":"Observation.code.coding","max":"1"},{"id":"Observation.code.coding.id","path":"Observation.code.coding.id","max":"0"},{"id":"Observation.code.coding.extension","path":"Observation.code.coding.extension","max":"0"},{"id":"Observation.code.coding.system","path":"Observation.code.coding.system","min":1,"maxLength":255},{"id":"Observation.code.coding.system.id","path":"Observation.code.coding.system.id","max":"0"},{"id":"Observation.code.coding.system.extension","path":"Observation.code.coding.system.extension","max":"0"},{"id":"Observation.code.coding.version","path":"Observation.code.coding.version","max":"0"},{"id":"Observation.code.coding.code","path":"Observation.code.coding.code","min":1,"maxLength":128},{"id":"Observation.code.coding.code.id","path":"Observation.code.coding.code.id","max":"0"},{"id":"Observation.code.coding.code.extension","path":"Observation.code.coding.code.extension","max":"0"},{"id":"Observation.code.coding.display","path":"Observation.code.coding.display","maxLength":128},{"id":"Observation.code.coding.display.id","path":"Observation.code.coding.display.id","max":"0"},{"id":"Observation.code.coding.display.extension","path":"Observation.code.coding.display.extension","max":"0"},{"id":"Observation.code.coding.userSelected","path":"Observation.code.coding.userSelected","max":"0"},{"id":"Observation.code.text","path":"Observation.code.text","maxLength":128},{"id":"Observation.code.text.id","path":"Observation.code.text.id","max":"0"},{"id":"Observation.code.text.extension","path":"Observation.code.text.extension","max":"0"},{"id":"Observation.subject","path":"Observation.subject","min":1},{"id":"Observation.subject.id","path":"Observation.subject.id","max":"0"},{"id":"Observation.subject.extension","path":"Observation.subject.extension","max":"0"},{"id":"Observation.subject.reference","path":"Observation.subject.reference","min":1},{"id":"Observation.subject.reference.id","path":"Observation.subject.reference.id","max":"0"},{"id":"Observation.subject.reference.extension","path":"Observation.subject.reference.extension","max":"0"},{"id":"Observation.subject.type","path":"Observation.subject.type","max":"0"},{"id":"Observation.subject.identifier","path":"Observation.subject.identifier","max":"0"},{"id":"Observation.subject.display","path":"Observation.subject.display","max":"0"},{"id":"Observation.focus","path":"Observation.focus","max":"0"},{"id":"Observation.encounter","path":"Observation.encounter","max":"0"},{"id":"Observation.effective[x]","path":"Observation.effective[x]","min":1,"type":[{"code":"Period"}]},{"id":"Observation.effective[x].id","path":"Observation.effective[x].id","max":"0"},{"id":"Observation.effective[x].extension","path":"Observation.effective[x].extension","max":"0"},{"id":"Observation.effective[x].start","path":"Observation.effective[x].start","min":1},{"id":"Observation.effective[x].start.id","path":"Observation.effective[x].start.id","max":"0"},{"id":"Observation.effective[x].start.extension","path":"Observation.effective[x].start.extension","max":"0"},{"id":"Observation.effective[x].end","path":"Observation.effective[x].end","min":1},{"id":"Observation.effective[x].end.id","path":"Observation.effective[x].end.id","max":"0"},{"id":"Observation.effective[x].end.extension","path":"Observation.effective[x].end.extension","max":"0"},{"id":"Observation.issued","path":"Observation.issued","max":"0"},{"id":"Observation.performer","path":"Observation.performer","max":"0"},{"id":"Observation.value[x]","path":"Observation.value[x]","min":1,"type":[{"code":"CodeableConcept"}]},{"id":"Observation.value[x].id","path":"Observation.value[x].id","max":"0"},{"id":"Observation.value[x].extension","path":"Observation.value[x].extension","max":"0"},{"id":"Observation.value[x].coding","path":"Observation.value[x].coding","max":"1"},{"id":"Observation.value[x].coding.id","path":"Observation.value[x].coding.id","max":"0"},{"id":"Observation.value[x].coding.extension","path":"Observation.value[x].coding.extension","max":"0"},{"id":"Observation.value[x].coding.system","path":"Observation.value[x].coding.system","min":1,"maxLength":255},{"id":"Observation.value[x].coding.system.id","path":"Observation.value[x].coding.system.id","max":"0"},{"id":"Observation.value[x].coding.system.extension","path":"Observation.value[x].coding.system.extension","max":"0"},{"id":"Observation.value[x].coding.version","path":"Observation.value[x].coding.version","max":"0"},{"id":"Observation.value[x].coding.code","path":"Observation.value[x].coding.code","min":1,"maxLength":128},{"id":"Observation.value[x].coding.code.id","path":"Observation.value[x].coding.code.id","max":"0"},{"id":"Observation.value[x].coding.code.extension","path":"Observation.value[x].coding.code.extension","max":"0"},{"id":"Observation.value[x].coding.display","path":"Observation.value[x].coding.display","maxLength":128},{"id":"Observation.value[x].coding.display.id","path":"Observation.value[x].coding.display.id","max":"0"},{"id":"Observation.value[x].coding.display.extension","path":"Observation.value[x].coding.display.extension","max":"0"},{"id":"Observation.value[x].coding.userSelected","path":"Observation.value[x].coding.userSelected","max":"0"},{"id":"Observation.value[x].text","path":"Observation.value[x].text","maxLength":128},{"id":"Observation.value[x].text.id","path":"Observation.value[x].text.id","max":"0"},{"id":"Observation.value[x].text.extension","path":"Observation.value[x].text.extension","max":"0"},{"id":"Observation.dataAbsentReason","path":"Observation.dataAbsentReason","max":"0"},{"id":"Observation.interpretation","path":"Observation.interpretation","max":"0"},{"id":"Observation.note","path":"Observation.note","max":"0"},{"id":"Observation.bodySite","path":"Observation.bodySite","max":"0"},{"id":"Observation.method","path":"Observation.method","max":"0"},{"id":"Observation.specimen","path":"Observation.specimen","max":"0"},{"id":"Observation.device.id","path":"Observation.device.id","max":"0"},{"id":"Observation.device.extension","path":"Observation.device.extension","max":"0"},{"id":"Observation.device.reference","path":"Observation.device.reference","min":1},{"id":"Observation.device.reference.id","path":"Observation.device.reference.id","max":"0"},{"id":"Observation.device.reference.extension","path":"Observation.device.reference.extension","max":"0"},{"id":"Observation.device.type","path":"Observation.device.type","max":"0"},{"id":"Observation.device.identifier","path":"Observation.device.identifier","max":"0"},{"id":"Observation.device.display","path":"Observation.device.display","max":"0"},{"id":"Observation.referenceRange","path":"Observation.referenceRange","max":"0"},{"id":"Observation.hasMember","path":"Observation.hasMember","max":"0"},{"id":"Observation.derivedFrom","path":"Observation.derivedFrom","max":"0"},{"id":"Observation.component","path":"Observation.component","max":"0"}]}}
