protected AllergyIntoleranceReactionComponent processAdverseReactionObservation ( Element reaction ) throws Exception { checkNoNegationOrNullFlavor ( reaction , "Adverse Reaction Observation" ) ; checkNoSubject ( reaction , "Adverse Reaction Observation" ) ; // This clinical statement represents an undesired symptom, finding, etc., due to an administered or exposed substance. A reaction can be defined with respect to its severity, and can have been treated by one or more interventions. AllergyIntoleranceReactionComponent ar = new AllergyIntoleranceReactionComponent ( ) ; // SHALL contain exactly one [1..1] id (CONF:7329). for ( Element e : cda . getChildren ( reaction , "id" ) ) ToolingExtensions . addIdentifier ( ar , convert . makeIdentifierFromII ( ) ) ; // SHALL contain exactly one [1..1] code (CONF:7327). The value set for this code element has not been specified. // todo: what the heck is this? // SHOULD contain zero or one [0..1] text (CONF:7330). // todo: so what is this? how can we know whether to ignore it? // 8. SHOULD contain zero or one [0..1] effectiveTime (CONF:7332). // a. This effectiveTime SHOULD contain zero or one [0..1] low (CONF:7333). // b. This effectiveTime SHOULD contain zero or one [0..1] high (CONF:7334). // !this is a problem because FHIR just has a date, not a period. ar . setOnsetElement ( convert . makeDateTimeFromIVL ( cda . getChild ( reaction , "effectiveTime" ) ) ) ; // SHALL contain exactly one [1..1] value with @xsi:type="CD", where the @code SHALL be selected from ValueSet 2.16.840.1.113883.3.88.12.3221.7.4 Problem DYNAMIC (CONF:7335). ar . getManifestation ( ) . add ( convert . makeCodeableConceptFromCD ( cda . getChild ( reaction , "value" ) ) ) ; // SHOULD contain zero or one [0..1] entryRelationship (CONF:7580) such that it SHALL contain exactly one [1..1] Severity Observation (templateId:2.16.840.1.113883.10.20.22.4.8) (CONF:7582). ar . setSeverity ( readSeverity ( cda . getSeverity ( reaction ) ) ) ; // MAY contain zero or more [0..*] entryRelationship (CONF:7337) such that it SHALL contain exactly one [1..1] Procedure Activity Procedure (templateId:2.16.840.1.113883.10.20.22.4.14) (CONF:7339). // i. This procedure activity is intended to contain information about procedures that were performed in response to an allergy reaction // todo: process these into an procedure and add as an extension // MAY contain zero or more [0..*] entryRelationship (CONF:7340) such that it SHALL contain exactly one [1..1] Medication Activity (templateId:2.16.840.1.113883.10.20.22.4.16) (CONF:7342). // i. This medication activity is intended to contain information about medications that were administered in response to an allergy reaction. (CONF:7584). // todo: process these into an medication statement and add as an extension return ar ; }
this is going to be a contained resource so we aren t going to generate any narrative