Sections API Reference¶
All clinical section builders.
AdmissionDiagnosisSection¶
AdmissionDiagnosisSection
¶
Bases: CDAElement
Builder for C-CDA Admission Diagnosis Section (V3).
This section contains a narrative description of the problems or diagnoses identified by the clinician at the time of the patient's admission. This section may contain a coded entry which represents the admitting diagnoses.
Template ID: 2.16.840.1.113883.10.20.22.2.43 (V3) Supports R2.1 (2015-08-01) version.
The section includes: - Narrative table showing diagnoses - Hospital Admission Diagnosis entries with Problem Observations
Conformance Requirements: - SHALL contain templateId (CONF:1198-9930, 1198-10391, 1198-32563) - SHALL contain code 46241-6 with translation 42347-5 (CONF:1198-15479, etc.) - SHALL contain title (CONF:1198-9932) - SHALL contain text (CONF:1198-9933) - SHOULD contain entry with Hospital Admission Diagnosis (CONF:1198-9934, 1198-15481)
Source code in ccdakit/builders/sections/admission_diagnosis.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
Functions¶
__init__(diagnoses=None, title='Hospital Admission Diagnosis', version=CDAVersion.R2_1, **kwargs)
¶
Initialize AdmissionDiagnosisSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diagnoses
|
Optional[Sequence[AdmissionDiagnosisProtocol]]
|
List of admission diagnoses satisfying AdmissionDiagnosisProtocol |
None
|
title
|
str
|
Section title (default: "Hospital Admission Diagnosis") |
'Hospital Admission Diagnosis'
|
version
|
CDAVersion
|
C-CDA version (R2.1) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/admission_diagnosis.py
build()
¶
Build Admission Diagnosis Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/admission_diagnosis.py
AdmissionMedicationsSection¶
AdmissionMedicationsSection
¶
Bases: CDAElement
Builder for C-CDA Admission Medications Section (entries optional).
The section contains the medications taken by the patient prior to and at the time of admission to the facility.
Template ID: 2.16.840.1.113883.10.20.22.2.44 Supports both R2.1 (2015-08-01) and R2.0 versions.
Source code in ccdakit/builders/sections/admission_medications.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
Functions¶
__init__(medications, title='Admission Medications', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize AdmissionMedicationsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
medications
|
Sequence[MedicationProtocol]
|
List of medications satisfying MedicationProtocol |
required |
title
|
str
|
Section title (default: "Admission Medications") |
'Admission Medications'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
Optional[str]
|
Null flavor if no medications available (e.g., "NI" for no information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/admission_medications.py
build()
¶
Build Admission Medications Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/admission_medications.py
AdvanceDirectivesSection¶
AdvanceDirectivesSection
¶
Bases: CDAElement
Builder for C-CDA Advance Directives Section (entries required).
Contains advance directives data and references to supporting documentation, including living wills, healthcare proxies, and CPR/resuscitation status. Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Template ID: 2.16.840.1.113883.10.20.22.2.21.1
Source code in ccdakit/builders/sections/advance_directives.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
Functions¶
__init__(directives=None, title='Advance Directives', null_flavor=None, version=CDAVersion.R2_1, **kwargs)
¶
Initialize AdvanceDirectivesSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directives
|
Optional[Sequence[AdvanceDirectiveProtocol]]
|
List of advance directives (None or empty for no information) |
None
|
title
|
str
|
Section title (default: "Advance Directives") |
'Advance Directives'
|
null_flavor
|
Optional[str]
|
NullFlavor if no information available (e.g., "NI") |
None
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/advance_directives.py
build()
¶
Build Advance Directives Section XML element.
Conformance rules implemented: - CONF:1198-32800: MAY contain @nullFlavor="NI" - CONF:1198-30227: SHALL contain templateId - CONF:1198-30228: templateId/@root="2.16.840.1.113883.10.20.22.2.21.1" - CONF:1198-32512: templateId/@extension="2015-08-01" - CONF:1198-32929: SHALL contain code - CONF:1198-32930: code/@code="42348-3" - CONF:1198-32931: code/@codeSystem=LOINC - CONF:1198-32932: SHALL contain title - CONF:1198-32933: SHALL contain text - CONF:1198-30235: If not nullFlavor, SHALL contain entry - CONF:1198-30236: entry MAY contain Advance Directive Observation - CONF:1198-32420: entry MAY contain Advance Directive Organizer - CONF:1198-32881: entry SHALL contain one or more entries with EITHER observation OR organizer
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/advance_directives.py
AllergiesSection¶
AllergiesSection
¶
Bases: CDAElement
Builder for C-CDA Allergies and Intolerances Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2014-06-09) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/allergies.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
Functions¶
__init__(allergies, title='Allergies and Intolerances', version=CDAVersion.R2_1, **kwargs)
¶
Initialize AllergiesSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
allergies
|
Sequence[AllergyProtocol]
|
List of allergies satisfying AllergyProtocol |
required |
title
|
str
|
Section title (default: "Allergies and Intolerances") |
'Allergies and Intolerances'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/allergies.py
build()
¶
Build Allergies and Intolerances Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/allergies.py
AnesthesiaSection¶
AnesthesiaSection
¶
Bases: CDAElement
Builder for C-CDA Anesthesia Section.
Records the type of anesthesia (e.g., general, local, regional) and may state the actual agents used. This may be a subsection of the Procedure Description Section. The full details of anesthesia are usually found in a separate Anesthesia Note.
Includes narrative (HTML table) and structured entries with: - Procedure Activity Procedure (V2) - for anesthesia type/procedure - Medication Activity (V2) - for anesthesia agents/medications
Supports R2.1 version (2014-06-09).
Template ID: 2.16.840.1.113883.10.20.22.2.25 (2014-06-09) LOINC Code: 59774-0 (Anesthesia)
Source code in ccdakit/builders/sections/anesthesia.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
Functions¶
__init__(anesthesia_records, title='Anesthesia', version=CDAVersion.R2_1, **kwargs)
¶
Initialize AnesthesiaSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
anesthesia_records
|
Sequence[AnesthesiaProtocol]
|
List of anesthesia data satisfying AnesthesiaProtocol |
required |
title
|
str
|
Section title (default: "Anesthesia") |
'Anesthesia'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/anesthesia.py
build()
¶
Build Anesthesia Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/anesthesia.py
AssessmentAndPlanSection¶
AssessmentAndPlanSection
¶
Bases: CDAElement
Builder for C-CDA Assessment and Plan Section (V2).
This section represents the clinician's conclusions and working assumptions that will guide treatment of the patient. It may contain planned activities.
Template ID: 2.16.840.1.113883.10.20.22.2.9 Version: 2014-06-09
The Assessment and Plan Section may be combined or separated to meet local policy requirements. See also: - Assessment Section: 2.16.840.1.113883.10.20.22.2.8 - Plan of Treatment Section (V2): 2.16.840.1.113883.10.20.22.2.10
Source code in ccdakit/builders/sections/assessment_and_plan.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
Functions¶
__init__(items=None, title='Assessment and Plan', version=CDAVersion.R2_1, **kwargs)
¶
Initialize AssessmentAndPlanSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
Sequence[AssessmentAndPlanItemProtocol]
|
List of assessment/plan items satisfying AssessmentAndPlanItemProtocol. Can be empty for narrative-only sections. |
None
|
title
|
str
|
Section title (default: "Assessment and Plan") |
'Assessment and Plan'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/assessment_and_plan.py
build()
¶
Build Assessment and Plan Section XML element.
Conformance
- CONF:1098-7705, 10381, 32583: SHALL contain templateId
- CONF:1098-15353, 15354, 32141: SHALL contain code="51847-2"
- CONF:1098-7707: SHALL contain text
- CONF:1098-7708, 15448: MAY contain entry with Planned Act (V2)
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/assessment_and_plan.py
ChiefComplaintAndReasonForVisitSection¶
ChiefComplaintAndReasonForVisitSection
¶
Bases: CDAElement
Builder for C-CDA Chief Complaint and Reason for Visit Section.
This section records the patient's chief complaint (the patient's own description) and/or the reason for the patient's visit (the provider's description of the reason for visit). Local policy determines whether the information is divided into two sections or recorded in one section serving both purposes.
Template: 2.16.840.1.113883.10.20.22.2.13 Code: 46239-0 (Chief Complaint and Reason for Visit) from LOINC
This section contains only narrative text - no structured entries are required. Supports both R2.1 and R2.0 versions.
Conformance: - CONF:81-7840: SHALL contain exactly one [1..1] templateId - CONF:81-10383: templateId/@root="2.16.840.1.113883.10.20.22.2.13" - CONF:81-15449: SHALL contain exactly one [1..1] code - CONF:81-15450: code/@code="46239-0" - CONF:81-26473: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-7842: SHALL contain exactly one [1..1] title - CONF:81-7843: SHALL contain exactly one [1..1] text
Source code in ccdakit/builders/sections/chief_complaint_reason_for_visit.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
Functions¶
__init__(chief_complaints=None, title='Chief Complaint and Reason for Visit', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ChiefComplaintAndReasonForVisitSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chief_complaints
|
Optional[Sequence[ChiefComplaintProtocol]]
|
List of chief complaint/reason for visit items. If None or empty, displays "No chief complaint or reason for visit documented" |
None
|
title
|
str
|
Section title (default: "Chief Complaint and Reason for Visit") |
'Chief Complaint and Reason for Visit'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/chief_complaint_reason_for_visit.py
build()
¶
Build Chief Complaint and Reason for Visit Section XML element.
Conformance: - CONF:81-7840: SHALL contain templateId - CONF:81-10383: templateId/@root="2.16.840.1.113883.10.20.22.2.13" - CONF:81-15449: SHALL contain code - CONF:81-15450: code/@code="46239-0" - CONF:81-26473: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-7842: SHALL contain title - CONF:81-7843: SHALL contain text
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/chief_complaint_reason_for_visit.py
ComplicationsSection¶
ComplicationsSection
¶
Bases: CDAElement
Builder for C-CDA Complications Section.
This section contains problems that occurred during or around the time of a procedure. The complications may be known risks or unanticipated problems.
Includes narrative (HTML table) and structured entries using Problem Observations. Supports R2.1 (2015-08-01) version.
Source code in ccdakit/builders/sections/complications.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
Functions¶
__init__(complications, title='Complications', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ComplicationsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
complications
|
Sequence[ComplicationProtocol]
|
List of complications satisfying ComplicationProtocol |
required |
title
|
str
|
Section title (default: "Complications") |
'Complications'
|
version
|
CDAVersion
|
C-CDA version (R2.1) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/complications.py
build()
¶
Build Complications Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/complications.py
DischargeDiagnosisSection¶
DischargeDiagnosisSection
¶
Bases: CDAElement
Builder for C-CDA Discharge Diagnosis Section.
This template represents problems or diagnoses present at the time of discharge which occurred during the hospitalization. This section includes an optional entry to record patient diagnoses specific to this visit. Problems that need ongoing tracking should also be included in the Problem Section.
Template ID: 2.16.840.1.113883.10.20.22.2.24
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/discharge_diagnosis.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
Functions¶
__init__(diagnoses, title='Discharge Diagnosis', version=CDAVersion.R2_1, **kwargs)
¶
Initialize DischargeDiagnosisSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diagnoses
|
Sequence[DischargeDiagnosisProtocol]
|
List of discharge diagnoses satisfying DischargeDiagnosisProtocol |
required |
title
|
str
|
Section title (default: "Discharge Diagnosis") |
'Discharge Diagnosis'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/discharge_diagnosis.py
build()
¶
Build Discharge Diagnosis Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/discharge_diagnosis.py
DischargeMedicationsSection¶
DischargeMedicationsSection
¶
Bases: CDAElement
Builder for C-CDA Discharge Medications Section (entries required).
This section contains the medications the patient is intended to take or stop after discharge. Current, active medications must be listed. The section may also include a patient's prescription history and indicate the source of the medication list.
Conforms to: - Discharge Medications Section (entries required) (V3) template (2.16.840.1.113883.10.20.22.2.11.1:2015-08-01)
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Source code in ccdakit/builders/sections/discharge_medications.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
Functions¶
__init__(medications, title='Discharge Medications', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize DischargeMedicationsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
medications
|
Sequence[MedicationProtocol]
|
List of medications satisfying MedicationProtocol |
required |
title
|
str
|
Section title (default: "Discharge Medications") |
'Discharge Medications'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
Optional[str]
|
Optional null flavor (e.g., "NI" for No Information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/discharge_medications.py
build()
¶
Build Discharge Medications Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/discharge_medications.py
EncountersSection¶
EncountersSection
¶
Bases: CDAElement
Builder for C-CDA Encounters Section (entries required).
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/encounters.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
Functions¶
__init__(encounters, title='Encounters', version=CDAVersion.R2_1, **kwargs)
¶
Initialize EncountersSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encounters
|
Sequence[EncounterProtocol]
|
List of encounters satisfying EncounterProtocol |
required |
title
|
str
|
Section title (default: "Encounters") |
'Encounters'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/encounters.py
build()
¶
Build Encounters Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/encounters.py
FamilyHistorySection¶
FamilyHistorySection
¶
Bases: CDAElement
Builder for C-CDA Family History Section.
This section contains data defining the patient's genetic relatives in terms of possible or relevant health risk factors that have a potential impact on the patient's healthcare risk profile.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Conformance: 2.16.840.1.113883.10.20.22.2.15 (Family History Section V3)
Source code in ccdakit/builders/sections/family_history.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
Functions¶
__init__(family_members, title='Family History', version=CDAVersion.R2_1, **kwargs)
¶
Initialize FamilyHistorySection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
family_members
|
Sequence[FamilyMemberHistoryProtocol]
|
List of family members satisfying FamilyMemberHistoryProtocol |
required |
title
|
str
|
Section title (default: "Family History") |
'Family History'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/family_history.py
build()
¶
Build Family History Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Conformance Rules
- CONF:1198-7932: SHALL contain templateId
- CONF:1198-10388: templateId/@root="2.16.840.1.113883.10.20.22.2.15"
- CONF:1198-32607: templateId/@extension="2015-08-01"
- CONF:1198-15469: SHALL contain code
- CONF:1198-15470: code/@code="10157-6"
- CONF:1198-32481: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC)
- CONF:1198-7934: SHALL contain title
- CONF:1198-7935: SHALL contain text
- CONF:1198-32430: MAY contain entry
- CONF:1198-32431: entry SHALL contain Family History Organizer
Source code in ccdakit/builders/sections/family_history.py
FunctionalStatusSection¶
FunctionalStatusSection
¶
Bases: CDAElement
Builder for C-CDA Functional Status Section.
Contains observations and assessments of a patient's physical abilities, including Activities of Daily Living (ADLs), Instrumental Activities of Daily Living (IADLs), mobility, self-care, and problems that impact function.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2014-06-09) and R2.0 (2014-06-09) versions.
Conformance: Template 2.16.840.1.113883.10.20.22.2.14
Source code in ccdakit/builders/sections/functional_status.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
Functions¶
__init__(organizers, title='Functional Status', version=CDAVersion.R2_1, **kwargs)
¶
Initialize FunctionalStatusSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organizers
|
Sequence[FunctionalStatusOrganizerProtocol]
|
List of functional status organizers |
required |
title
|
str
|
Section title (default: "Functional Status") |
'Functional Status'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/functional_status.py
build()
¶
Build Functional Status Section XML element.
Implements conformance rules: - CONF:1098-7920, CONF:1098-10389, CONF:1098-32567: templateId - CONF:1098-14578, CONF:1098-14579, CONF:1098-30866: code - CONF:1098-7922: title - CONF:1098-7923: text (narrative) - CONF:1098-14414, CONF:1098-14415: entry with organizer (optional)
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/functional_status.py
GoalsSection¶
GoalsSection
¶
Bases: CDAElement
Builder for C-CDA Goals Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 and R2.0 versions.
Template ID: 2.16.840.1.113883.10.20.22.2.60
Source code in ccdakit/builders/sections/goals.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
Functions¶
__init__(goals, title='Goals', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize GoalsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
goals
|
Sequence[GoalProtocol]
|
List of goals satisfying GoalProtocol |
required |
title
|
str
|
Section title (default: "Goals") |
'Goals'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
str
|
Optional null flavor (e.g., "NI" for no information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/goals.py
build()
¶
Build Goals Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/goals.py
HealthConcernsSection¶
HealthConcernsSection
¶
Bases: CDAElement
Builder for C-CDA Health Concerns Section (V2).
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Per spec (2.16.840.1.113883.10.20.22.2.58): - code="75310-3" Health concerns document from LOINC (CONF:1198-28806) - SHALL contain title (CONF:1198-28809) - SHALL contain text (CONF:1198-28810) - If section/@nullFlavor is not present, SHALL contain at least one Health Concern Act entry (CONF:1198-30768) - MAY contain nullFlavor="NI" (CONF:1198-32802)
Source code in ccdakit/builders/sections/health_concerns.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
Functions¶
__init__(health_concerns, title='Health Concerns', null_flavor=None, version=CDAVersion.R2_1, **kwargs)
¶
Initialize HealthConcernsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
health_concerns
|
Sequence[HealthConcernProtocol]
|
List of health concerns satisfying HealthConcernProtocol |
required |
title
|
str
|
Section title (default: "Health Concerns") |
'Health Concerns'
|
null_flavor
|
Optional[str]
|
Optional null flavor (e.g., "NI") if no information available |
None
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/health_concerns.py
build()
¶
Build Health Concerns Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/health_concerns.py
HealthStatusEvaluationsSection¶
HealthStatusEvaluationsAndOutcomesSection
¶
Bases: CDAElement
Builder for C-CDA Health Status Evaluations and Outcomes Section.
This section represents outcomes of the patient's health status. These assessed outcomes are represented as statuses, at points in time. It also includes outcomes of care from the interventions used to treat the patient, related to established care plan goals and/or interventions.
Includes narrative (HTML table) and structured entries. Supports both R2.1 and R2.0 versions.
Template ID: 2.16.840.1.113883.10.20.22.2.61
Conformance Rules: - MAY contain nullFlavor="NI" (CONF:1098-32821) - SHALL contain templateId (CONF:1098-29578, CONF:1098-29579) - SHALL contain code="11383-7" (CONF:1098-29580, CONF:1098-29581, CONF:1098-29582) - SHALL contain title (CONF:1098-29589) - SHALL contain text (CONF:1098-29590) - SHALL contain at least one [1..*] entry with Outcome Observation (CONF:1098-31227, CONF:1098-31228)
Source code in ccdakit/builders/sections/health_status_evaluations.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
Functions¶
__init__(outcomes, title='Health Status Evaluations and Outcomes', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize HealthStatusEvaluationsAndOutcomesSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outcomes
|
Sequence[OutcomeObservationProtocol]
|
List of outcomes satisfying OutcomeObservationProtocol |
required |
title
|
str
|
Section title (default: "Health Status Evaluations and Outcomes") |
'Health Status Evaluations and Outcomes'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
str
|
Optional null flavor (e.g., "NI" for no information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/health_status_evaluations.py
build()
¶
Build Health Status Evaluations and Outcomes Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/health_status_evaluations.py
HospitalCourseSection¶
HospitalCourseSection
¶
Bases: CDAElement
Builder for C-CDA Hospital Course Section.
This section describes the sequence of events from admission to discharge in a hospital facility. It is a narrative-only section that provides a chronological account of the patient's hospital stay.
The Hospital Course Section is typically included in Discharge Summary documents to document the patient's clinical course during hospitalization, including significant events, treatments, procedures, and response to therapy.
This is a narrative-only section with no structured entries.
Conformance: - Template ID: 1.3.6.1.4.1.19376.1.5.3.1.3.5 (IHE) - Code: 8648-8 (Hospital Course) from LOINC - Contains: Narrative text only (no entries required)
References: - CONF:81-7852: SHALL contain templateId - CONF:81-10459: templateId/@root="1.3.6.1.4.1.19376.1.5.3.1.3.5" - CONF:81-15487: SHALL contain code - CONF:81-15488: code/@code="8648-8" - CONF:81-26480: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-7854: SHALL contain title - CONF:81-7855: SHALL contain text
Source code in ccdakit/builders/sections/hospital_course.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
Functions¶
__init__(hospital_course=None, narrative_text=None, title='Hospital Course', version=CDAVersion.R2_1, **kwargs)
¶
Initialize HospitalCourseSection builder.
You can provide either: 1. A HospitalCourseProtocol object with course_text property 2. A narrative_text string directly 3. Both (narrative_text takes precedence)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hospital_course
|
Optional[HospitalCourseProtocol]
|
Hospital course data object implementing HospitalCourseProtocol |
None
|
narrative_text
|
Optional[str]
|
Free-form narrative text for hospital course (takes precedence) |
None
|
title
|
str
|
Section title (default: "Hospital Course") |
'Hospital Course'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither hospital_course nor narrative_text is provided |
Source code in ccdakit/builders/sections/hospital_course.py
build()
¶
Build Hospital Course Section XML element.
Conformance: - CONF:81-7852: SHALL contain templateId - CONF:81-10459: templateId/@root="1.3.6.1.4.1.19376.1.5.3.1.3.5" - CONF:81-15487: SHALL contain code - CONF:81-15488: code/@code="8648-8" - CONF:81-26480: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-7854: SHALL contain title - CONF:81-7855: SHALL contain text
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/hospital_course.py
HospitalDischargeInstructionsSection¶
HospitalDischargeInstructionsSection
¶
Bases: CDAElement
Builder for C-CDA Hospital Discharge Instructions Section.
This section records instructions provided to the patient at hospital discharge. It contains only narrative text (no structured entries are required or typically used).
The section can contain general discharge instructions or categorized instructions (e.g., medications, diet, activity, follow-up care).
Supports both R2.1 and R2.0 versions.
Conformance: - Template ID: 2.16.840.1.113883.10.20.22.2.41 - Code: 8653-8 (Hospital Discharge Instructions) from LOINC - Contains: Narrative text only (no entries required)
References: - CONF:81-9919: SHALL contain templateId - CONF:81-10395: templateId/@root="2.16.840.1.113883.10.20.22.2.41" - CONF:81-15357: SHALL contain code - CONF:81-15358: code/@code="8653-8" - CONF:81-26481: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-9921: SHALL contain title - CONF:81-9922: SHALL contain text
Source code in ccdakit/builders/sections/hospital_discharge_instructions.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
Functions¶
__init__(instructions=None, narrative_text=None, title='Hospital Discharge Instructions', version=CDAVersion.R2_1, **kwargs)
¶
Initialize HospitalDischargeInstructionsSection builder.
You can provide either: 1. A list of DischargeInstructionProtocol objects (will be formatted as a list/table) 2. A narrative_text string (will be used as-is in a paragraph) 3. Both (instructions will be formatted as a table, narrative_text as preamble)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instructions
|
Optional[Sequence[DischargeInstructionProtocol]]
|
List of discharge instructions (optional) |
None
|
narrative_text
|
Optional[str]
|
Free-form narrative text for instructions (optional) |
None
|
title
|
str
|
Section title (default: "Hospital Discharge Instructions") |
'Hospital Discharge Instructions'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither instructions nor narrative_text is provided |
Source code in ccdakit/builders/sections/hospital_discharge_instructions.py
build()
¶
Build Hospital Discharge Instructions Section XML element.
Conformance: - CONF:81-9919: SHALL contain templateId - CONF:81-10395: templateId/@root="2.16.840.1.113883.10.20.22.2.41" - CONF:81-15357: SHALL contain code - CONF:81-15358: code/@code="8653-8" - CONF:81-26481: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-9921: SHALL contain title - CONF:81-9922: SHALL contain text
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/hospital_discharge_instructions.py
HospitalDischargeStudiesSummarySection¶
HospitalDischargeStudiesSummarySection
¶
Bases: CDAElement
Builder for C-CDA Hospital Discharge Studies Summary Section.
This section records the results of observations generated by laboratories, imaging procedures, and other procedures at discharge. The scope includes hematology, chemistry, serology, virology, toxicology, microbiology, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine, pathology, and procedure observations.
Implements Hospital Discharge Studies Summary Section (template 2.16.840.1.113883.10.20.22.2.16).
Key features: - Groups discharge studies by panel/organizer - Displays study name, value, unit, interpretation, and reference range - Supports LOINC codes for study identification - Reuses Result Organizer entry pattern for consistency
Source code in ccdakit/builders/sections/discharge_studies.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
Functions¶
__init__(study_organizers, title='Hospital Discharge Studies Summary', version=CDAVersion.R2_1, **kwargs)
¶
Initialize HospitalDischargeStudiesSummarySection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
study_organizers
|
Sequence[DischargeStudyOrganizerProtocol]
|
List of discharge study organizers (study panels) |
required |
title
|
str
|
Section title (default: "Hospital Discharge Studies Summary") |
'Hospital Discharge Studies Summary'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/discharge_studies.py
build()
¶
Build Hospital Discharge Studies Summary Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/discharge_studies.py
ImmunizationsSection¶
ImmunizationsSection
¶
Bases: CDAElement
Builder for C-CDA Immunizations Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/immunizations.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
Functions¶
__init__(immunizations, title='Immunizations', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ImmunizationsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
immunizations
|
Sequence[ImmunizationProtocol]
|
List of immunizations satisfying ImmunizationProtocol |
required |
title
|
str
|
Section title (default: "Immunizations") |
'Immunizations'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/immunizations.py
build()
¶
Build Immunizations Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/immunizations.py
InstructionsSection¶
InstructionsSection
¶
Bases: CDAElement
Builder for C-CDA Instructions Section (V2).
This section records instructions given to a patient. It can be used to list patient decision aids, education materials, and other instructions provided to the patient or their caregivers.
Template ID: 2.16.840.1.113883.10.20.22.2.45 Release: 2014-06-09
Supports both R2.1 and R2.0 versions.
Conformance Rules: - MAY contain @nullFlavor="NI" (CONF:1098-32835) - SHALL contain templateId with root="2.16.840.1.113883.10.20.22.2.45" (CONF:1098-10112, CONF:1098-31384) - SHALL contain templateId extension="2014-06-09" (CONF:1098-32599) - SHALL contain code="69730-0" from LOINC (CONF:1098-15375, CONF:1098-15376, CONF:1098-32148) - SHALL contain title (CONF:1098-10114) - SHALL contain text (CONF:1098-10115) - SHALL contain at least one [1..*] entry with Instruction (V2) if @nullFlavor not present (CONF:1098-10116, CONF:1098-31398)
Common Uses: - Patient education materials - Decision aids - Care instructions - Discharge instructions - Medication instructions
Source code in ccdakit/builders/sections/instructions.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
Functions¶
__init__(instructions=None, title='Instructions', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize InstructionsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instructions
|
Optional[Sequence[InstructionProtocol]]
|
List of instructions satisfying InstructionProtocol |
None
|
title
|
str
|
Section title (default: "Instructions") |
'Instructions'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
str
|
Optional null flavor (e.g., "NI" for no information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/instructions.py
build()
¶
Build Instructions Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/instructions.py
InterventionsSection¶
InterventionsSection
¶
Bases: CDAElement
Builder for C-CDA Interventions Section (V3).
This section represents interventions - actions taken to maximize the prospects of achieving the goals of care for the patient, including removal of barriers to success. Interventions can be planned, ordered, historical, etc.
Interventions include actions that may be ongoing (e.g., maintenance medications, monitoring health status). Instructions are nested within interventions and may include self-care instructions.
Template ID: 2.16.840.1.113883.10.20.21.2.3 Release: 2015-08-01
Supports both R2.1 and R2.0 versions.
Conformance Rules: - SHALL contain templateId with root="2.16.840.1.113883.10.20.21.2.3" (CONF:1198-8680, CONF:1198-10461) - SHALL contain templateId extension="2015-08-01" (CONF:1198-32559) - SHALL contain code="62387-6" from LOINC (CONF:1198-15377, CONF:1198-15378, CONF:1198-30864) - SHALL contain title (CONF:1198-8682) - SHALL contain text (CONF:1198-8683) - SHOULD contain zero or more [0..] entry with Intervention Act (CONF:1198-30996, CONF:1198-30997) - SHOULD contain zero or more [0..] entry with Planned Intervention Act (CONF:1198-32730, CONF:1198-32731)
Source code in ccdakit/builders/sections/interventions.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
Functions¶
__init__(interventions=None, planned_interventions=None, title='Interventions', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize InterventionsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
interventions
|
Optional[Sequence[InterventionProtocol]]
|
List of completed interventions satisfying InterventionProtocol |
None
|
planned_interventions
|
Optional[Sequence[PlannedInterventionProtocol]]
|
List of planned interventions satisfying PlannedInterventionProtocol |
None
|
title
|
str
|
Section title (default: "Interventions") |
'Interventions'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
str
|
Optional null flavor (e.g., "NI" for no information) |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/interventions.py
build()
¶
Build Interventions Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/interventions.py
MedicalEquipmentSection¶
MedicalEquipmentSection
¶
Bases: CDAElement
Builder for C-CDA Medical Equipment Section.
Defines a patient's implanted and external health and medical devices and equipment. Lists any pertinent durable medical equipment (DME) used to help maintain the patient's health status.
Includes narrative (HTML table) and structured entries. Supports both R2.1 and R2.0 versions (both use 2014-06-09 extension).
Source code in ccdakit/builders/sections/medical_equipment.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
Functions¶
__init__(equipment_list, title='Medical Equipment', use_organizer=False, organizer_start_date=None, organizer_end_date=None, version=CDAVersion.R2_1, **kwargs)
¶
Initialize MedicalEquipmentSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
equipment_list
|
Sequence[MedicalEquipmentProtocol]
|
List of medical equipment items satisfying MedicalEquipmentProtocol |
required |
title
|
str
|
Section title (default: "Medical Equipment") |
'Medical Equipment'
|
use_organizer
|
bool
|
If True, wrap equipment in Medical Equipment Organizer |
False
|
organizer_start_date
|
Optional[object]
|
Start date if using organizer |
None
|
organizer_end_date
|
Optional[object]
|
End date if using organizer |
None
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/medical_equipment.py
build()
¶
Build Medical Equipment Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/medical_equipment.py
MedicationsAdministeredSection¶
MedicationsAdministeredSection
¶
Bases: CDAElement
Builder for C-CDA Medications Administered Section (V2).
This section documents medications and fluids administered during a procedure, encounter, or other clinical activity, excluding anesthetic medications (which should be documented in the Anesthesia Section).
Template ID: 2.16.840.1.113883.10.20.22.2.38 (2014-06-09) LOINC Code: 29549-3 (Medications Administered)
Typically used in: - Procedure Notes - Emergency Department visits - Inpatient encounters - Surgical procedures
Note: Anesthesia medications should use the Anesthesia Section (2.16.840.1.113883.10.20.22.2.25) instead.
Source code in ccdakit/builders/sections/medications_administered.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
Functions¶
__init__(medications, title='Medications Administered', version=CDAVersion.R2_1, null_flavor=None, **kwargs)
¶
Initialize MedicationsAdministeredSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
medications
|
Sequence[MedicationAdministeredProtocol]
|
List of medications satisfying MedicationAdministeredProtocol |
required |
title
|
str
|
Section title (default: "Medications Administered") |
'Medications Administered'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
null_flavor
|
Optional[str]
|
Null flavor code if section has no information (e.g., "NI") |
None
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/medications_administered.py
build()
¶
Build Medications Administered Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/medications_administered.py
MedicationsSection¶
MedicationsSection
¶
Bases: CDAElement
Builder for C-CDA Medications Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/medications.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
Functions¶
__init__(medications, title='Medications', version=CDAVersion.R2_1, **kwargs)
¶
Initialize MedicationsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
medications
|
Sequence[MedicationProtocol]
|
List of medications satisfying MedicationProtocol |
required |
title
|
str
|
Section title (default: "Medications") |
'Medications'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/medications.py
build()
¶
Build Medications Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/medications.py
MentalStatusSection¶
MentalStatusSection
¶
Bases: CDAElement
Builder for C-CDA Mental Status Section (V2).
Contains observations and evaluations related to a patient's psychological and mental competency including appearance, attitude, behavior, mood and affect, speech and language, thought process, thought content, perception, cognition, insight and judgment.
Template ID: 2.16.840.1.113883.10.20.22.2.56 Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Includes narrative (HTML table) and structured entries.
Source code in ccdakit/builders/sections/mental_status.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
Functions¶
__init__(observations=None, organizers=None, title='Mental Status', version=CDAVersion.R2_1, **kwargs)
¶
Initialize MentalStatusSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observations
|
Sequence[MentalStatusObservationProtocol]
|
List of mental status observations (optional) |
None
|
organizers
|
Sequence[MentalStatusOrganizerProtocol]
|
List of mental status organizers (optional) |
None
|
title
|
str
|
Section title (default: "Mental Status") |
'Mental Status'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Note
Either observations or organizers (or both) should be provided. If neither is provided, the section will show "No mental status observations recorded."
Source code in ccdakit/builders/sections/mental_status.py
build()
¶
Build Mental Status Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
CONF Rules Implemented
- CONF:1198-28293, CONF:1198-28294, CONF:1198-32793: templateId
- CONF:1198-28295, CONF:1198-28296, CONF:1198-30826: code=10190-7 (LOINC)
- CONF:1198-28297: title [1..1]
- CONF:1198-28298: text [1..1]
- CONF:1198-28301, CONF:1198-28302: entry with Mental Status Organizer [0..*]
- CONF:1198-28305, CONF:1198-28306: entry with Mental Status Observation [0..*]
- CONF:1198-28313, CONF:1198-28314: entry with Assessment Scale Observation [0..*]
Source code in ccdakit/builders/sections/mental_status.py
NutritionSection¶
NutritionSection
¶
Bases: CDAElement
Builder for C-CDA Nutrition Section.
Represents diet and nutrition information including special diet requirements and restrictions (e.g., texture modified diet, liquids only, enteral feeding). Also represents the overall nutritional status of the patient and nutrition assessment findings.
Template: 2.16.840.1.113883.10.20.22.2.57 Code: 61144-2 (Diet and nutrition) from LOINC
Conformance Rules: - CONF:1098-30477: SHALL contain templateId - CONF:1098-30478: templateId/@root="2.16.840.1.113883.10.20.22.2.57" - CONF:1098-30318: SHALL contain code - CONF:1098-30319: code/@code="61144-2" - CONF:1098-30320: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:1098-31042: SHALL contain title - CONF:1098-31043: SHALL contain text - CONF:1098-30321: SHOULD contain zero or more [0..*] entry - CONF:1098-30322: entry SHALL contain Nutritional Status Observation
Includes narrative (HTML table) and structured entries. Supports both R2.1 and R2.0 versions.
Source code in ccdakit/builders/sections/nutrition.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
Functions¶
__init__(nutritional_statuses, title='Nutrition', version=CDAVersion.R2_1, **kwargs)
¶
Initialize NutritionSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nutritional_statuses
|
Sequence[NutritionalStatusProtocol]
|
List of nutritional status observations |
required |
title
|
str
|
Section title (default: "Nutrition") |
'Nutrition'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/nutrition.py
build()
¶
Build Nutrition Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/nutrition.py
PastMedicalHistorySection¶
PastMedicalHistorySection
¶
Bases: CDAElement
Builder for C-CDA Past Medical History Section.
This section contains a record of the patient's past complaints, problems, and diagnoses. It contains data from the patient's past up to the patient's current complaint or reason for seeking medical care.
Includes narrative (HTML table) and structured entries with Problem Observations. Supports both R2.1 (2015-08-01) and R2.0 versions.
Conformance: - Template ID: 2.16.840.1.113883.10.20.22.2.20 - Code: 11348-0 (History of Past Illness) from LOINC - Contains: Problem Observation entries (optional, 0..*)
Source code in ccdakit/builders/sections/past_medical_history.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
Functions¶
__init__(problems, title='Past Medical History', version=CDAVersion.R2_1, **kwargs)
¶
Initialize PastMedicalHistorySection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
problems
|
Sequence[ProblemProtocol]
|
List of problems satisfying ProblemProtocol |
required |
title
|
str
|
Section title (default: "Past Medical History") |
'Past Medical History'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/past_medical_history.py
build()
¶
Build Past Medical History Section XML element.
Conformance: - CONF:1198-7828: SHALL contain templateId - CONF:1198-10390: templateId/@root="2.16.840.1.113883.10.20.22.2.20" - CONF:1198-32536: templateId/@extension="2015-08-01" (R2.1) - CONF:1198-15474: SHALL contain code - CONF:1198-15475: code/@code="11348-0" - CONF:1198-30831: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:1198-7830: SHALL contain title - CONF:1198-7831: SHALL contain text - CONF:1198-8791: MAY contain entries - CONF:1198-15476: entry SHALL contain Problem Observation
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/past_medical_history.py
PayersSection¶
PayersSection
¶
Bases: CDAElement
Builder for C-CDA Payers Section.
The Payers Section contains data on the patient's payers, whether third party insurance, self-pay, other payer or guarantor. Each unique instance of a payer and all pertinent data needed to contact, bill to, and collect from that payer should be included.
Includes narrative (HTML table) and structured entries (Coverage Activities).
Conforms to: - Template ID: 2.16.840.1.113883.10.20.22.2.18 (Payers Section V3) - Extension: 2015-08-01 - LOINC Code: 48768-6 "Payers"
Supports both R2.1 and R2.0 versions.
Source code in ccdakit/builders/sections/payers.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
Functions¶
__init__(payers, title='Insurance Providers', version=CDAVersion.R2_1, **kwargs)
¶
Initialize PayersSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payers
|
Sequence[PayerProtocol]
|
List of payers satisfying PayerProtocol |
required |
title
|
str
|
Section title (default: "Insurance Providers") |
'Insurance Providers'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/payers.py
build()
¶
Build Payers Section XML element.
Conforms to all CONF rules from template 2.16.840.1.113883.10.20.22.2.18: - CONF:1198-7924/10434/32597: templateId - CONF:1198-15395/15396/32149: code="48768-6" Payers - CONF:1198-7926: title - CONF:1198-7927: text - CONF:1198-7959/15501: entry with Coverage Activity (SHOULD)
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/payers.py
PhysicalExamSection¶
PhysicalExamSection
¶
Bases: CDAElement
Builder for C-CDA Physical Exam Section (V3).
The section includes direct observations made by a clinician. The examination may include the use of simple instruments and may also describe simple maneuvers performed directly on the patient's body.
Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Conforms to: - Physical Exam Section (V3): 2.16.840.1.113883.10.20.2.10:2015-08-01
Source code in ccdakit/builders/sections/physical_exam.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | |
Functions¶
__init__(wound_observations=None, title='Physical Exam', text=None, version=CDAVersion.R2_1, **kwargs)
¶
Initialize PhysicalExamSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wound_observations
|
Optional[Sequence[WoundObservationProtocol]]
|
Optional list of wound observations |
None
|
title
|
str
|
Section title (default: "Physical Exam") |
'Physical Exam'
|
text
|
Optional[str]
|
Optional narrative text content |
None
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/physical_exam.py
build()
¶
Build Physical Exam Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/physical_exam.py
PlanOfTreatmentSection¶
PlanOfTreatmentSection
¶
Bases: CDAElement
Builder for C-CDA Plan of Treatment Section (V2).
Includes narrative (HTML table) and structured entries for planned activities. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions. Template ID: 2.16.840.1.113883.10.20.22.2.10
This section contains pending orders, interventions, encounters, services, and procedures for the patient. All entries use moodCode of INT (intent) or other prospective mood codes.
Source code in ccdakit/builders/sections/plan_of_treatment.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
Functions¶
__init__(planned_observations=None, planned_procedures=None, planned_encounters=None, planned_acts=None, planned_medications=None, planned_supplies=None, planned_immunizations=None, instructions=None, title='Plan of Treatment', version=CDAVersion.R2_1, **kwargs)
¶
Initialize PlanOfTreatmentSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planned_observations
|
Optional[Sequence[PlannedObservationProtocol]]
|
List of planned observations |
None
|
planned_procedures
|
Optional[Sequence[PlannedProcedureProtocol]]
|
List of planned procedures |
None
|
planned_encounters
|
Optional[Sequence[PlannedEncounterProtocol]]
|
List of planned encounters |
None
|
planned_acts
|
Optional[Sequence[PlannedActProtocol]]
|
List of planned acts |
None
|
planned_medications
|
Optional[Sequence[PlannedMedicationProtocol]]
|
List of planned medications |
None
|
planned_supplies
|
Optional[Sequence[PlannedSupplyProtocol]]
|
List of planned supplies |
None
|
planned_immunizations
|
Optional[Sequence[PlannedImmunizationProtocol]]
|
List of planned immunizations |
None
|
instructions
|
Optional[Sequence[InstructionProtocol]]
|
List of instructions |
None
|
title
|
str
|
Section title (default: "Plan of Treatment") |
'Plan of Treatment'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/plan_of_treatment.py
build()
¶
Build Plan of Treatment Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/plan_of_treatment.py
PostoperativeDiagnosisSection¶
PostoperativeDiagnosisSection
¶
Bases: CDAElement
Builder for C-CDA Postoperative Diagnosis Section.
The Postoperative Diagnosis Section records the diagnosis or diagnoses discovered or confirmed during surgery. Often it is the same as the preoperative diagnosis.
This is a simple narrative-only section without structured entries. Supports both R2.1 and R2.0 versions.
Conformance: - Template ID: 2.16.840.1.113883.10.20.22.2.35 - Code: 10218-6 (Postoperative Diagnosis) from LOINC - Contains: Only narrative text, no structured entries
Source code in ccdakit/builders/sections/postoperative_diagnosis.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
Functions¶
__init__(diagnosis_text, title='Postoperative Diagnosis', version=CDAVersion.R2_1, **kwargs)
¶
Initialize PostoperativeDiagnosisSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diagnosis_text
|
str
|
The narrative text describing the postoperative diagnosis |
required |
title
|
str
|
Section title (default: "Postoperative Diagnosis") |
'Postoperative Diagnosis'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/postoperative_diagnosis.py
build()
¶
Build Postoperative Diagnosis Section XML element.
Conformance: - CONF:81-8101: SHALL contain exactly one [1..1] templateId - CONF:81-10437: templateId/@root="2.16.840.1.113883.10.20.22.2.35" - CONF:81-15401: SHALL contain exactly one [1..1] code - CONF:81-15402: code/@code="10218-6" (Postoperative Diagnosis) - CONF:81-26488: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-8103: SHALL contain exactly one [1..1] title - CONF:81-8104: SHALL contain exactly one [1..1] text
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/postoperative_diagnosis.py
PreoperativeDiagnosisSection¶
PreoperativeDiagnosisSection
¶
Bases: CDAElement
Builder for C-CDA Preoperative Diagnosis Section.
The Preoperative Diagnosis Section records the surgical diagnoses assigned to the patient before the surgical procedure which are the reason for the surgery. The preoperative diagnosis is, in the surgeon's opinion, the diagnosis that will be confirmed during surgery.
Includes narrative (HTML table) and structured entries. Supports R2.1 (2015-08-01) version.
Template ID: 2.16.840.1.113883.10.20.22.2.34
Source code in ccdakit/builders/sections/preoperative_diagnosis.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
Functions¶
__init__(diagnoses, title='Preoperative Diagnosis', version=CDAVersion.R2_1, **kwargs)
¶
Initialize PreoperativeDiagnosisSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diagnoses
|
Sequence[PreoperativeDiagnosisProtocol]
|
List of preoperative diagnoses satisfying PreoperativeDiagnosisProtocol |
required |
title
|
str
|
Section title (default: "Preoperative Diagnosis") |
'Preoperative Diagnosis'
|
version
|
CDAVersion
|
C-CDA version (R2.1) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/preoperative_diagnosis.py
build()
¶
Build Preoperative Diagnosis Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/preoperative_diagnosis.py
ProblemsSection¶
ProblemsSection
¶
Bases: CDAElement
Builder for C-CDA Problems Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Functions¶
__init__(problems, title='Problems', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ProblemsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
problems
|
Sequence[ProblemProtocol]
|
List of problems satisfying ProblemProtocol |
required |
title
|
str
|
Section title (default: "Problems") |
'Problems'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
build()
¶
Build Problems Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
ProceduresSection¶
ProceduresSection
¶
Bases: CDAElement
Builder for C-CDA Procedures Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/procedures.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
Functions¶
__init__(procedures, title='Procedures', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ProceduresSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
procedures
|
Sequence[ProcedureProtocol]
|
List of procedures satisfying ProcedureProtocol |
required |
title
|
str
|
Section title (default: "Procedures") |
'Procedures'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/procedures.py
build()
¶
Build Procedures Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/procedures.py
ReasonForVisitSection¶
ReasonForVisitSection
¶
Bases: CDAElement
Builder for C-CDA Reason for Visit Section.
This section records the patient's reason for the patient's visit as documented by the provider. Local policy determines whether Reason for Visit and Chief Complaint are in separate or combined sections.
This is a simple narrative-only section without structured entries. Supports both R2.1 and R2.0 versions.
Conformance: - Template ID: 2.16.840.1.113883.10.20.22.2.12 - Code: 29299-5 (Reason for Visit) from LOINC - Contains: Only narrative text, no structured entries
Source code in ccdakit/builders/sections/reason_for_visit.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
Functions¶
__init__(reason_text, title='Reason for Visit', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ReasonForVisitSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reason_text
|
str
|
The narrative text describing the reason for visit |
required |
title
|
str
|
Section title (default: "Reason for Visit") |
'Reason for Visit'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/reason_for_visit.py
build()
¶
Build Reason for Visit Section XML element.
Conformance: - CONF:81-7836: SHALL contain exactly one [1..1] templateId - CONF:81-10448: templateId/@root="2.16.840.1.113883.10.20.22.2.12" - CONF:81-15429: SHALL contain exactly one [1..1] code - CONF:81-15430: code/@code="29299-5" (Reason for Visit) - CONF:81-26494: code/@codeSystem="2.16.840.1.113883.6.1" (LOINC) - CONF:81-7838: SHALL contain exactly one [1..1] title - CONF:81-7839: SHALL contain exactly one [1..1] text
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/reason_for_visit.py
ResultsSection¶
ResultsSection
¶
Bases: CDAElement
Builder for C-CDA Results Section (entries required).
Includes narrative (HTML table) and structured entries for lab results. Implements Results Section V3 (template 2.16.840.1.113883.10.20.22.2.3.1:2015-08-01).
Key features: - Groups lab results by panel/organizer - Displays test name, value, unit, interpretation, and reference range - Supports LOINC codes for test identification
Source code in ccdakit/builders/sections/results.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
Functions¶
__init__(result_organizers, title='Results', version=CDAVersion.R2_1, **kwargs)
¶
Initialize ResultsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result_organizers
|
Sequence[ResultOrganizerProtocol]
|
List of result organizers (lab panels) |
required |
title
|
str
|
Section title (default: "Results") |
'Results'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/results.py
build()
¶
Build Results Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/results.py
SocialHistorySection¶
SocialHistorySection
¶
Bases: CDAElement
Builder for C-CDA Social History Section.
Contains social history data that influence a patient's physical, psychological or emotional health (e.g., smoking status, pregnancy). This implementation focuses on smoking status observations as specified in Meaningful Use requirements.
Template: 2.16.840.1.113883.10.20.22.2.17 (V3: 2015-08-01) Code: 29762-2 (Social History) from LOINC
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2015-08-01) versions.
Source code in ccdakit/builders/sections/social_history.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
Functions¶
__init__(smoking_statuses, title='Social History', version=CDAVersion.R2_1, **kwargs)
¶
Initialize SocialHistorySection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smoking_statuses
|
Sequence[SmokingStatusProtocol]
|
List of smoking status observations |
required |
title
|
str
|
Section title (default: "Social History") |
'Social History'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/social_history.py
build()
¶
Build Social History Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |
Source code in ccdakit/builders/sections/social_history.py
VitalSignsSection¶
VitalSignsSection
¶
Bases: CDAElement
Builder for C-CDA Vital Signs Section.
Includes narrative (HTML table) and structured entries. Supports both R2.1 (2015-08-01) and R2.0 (2014-06-09) versions.
Source code in ccdakit/builders/sections/vital_signs.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
Functions¶
__init__(vital_signs_organizers, title='Vital Signs', version=CDAVersion.R2_1, **kwargs)
¶
Initialize VitalSignsSection builder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vital_signs_organizers
|
Sequence[VitalSignsOrganizerProtocol]
|
List of vital signs organizers |
required |
title
|
str
|
Section title (default: "Vital Signs") |
'Vital Signs'
|
version
|
CDAVersion
|
C-CDA version (R2.1 or R2.0) |
R2_1
|
**kwargs
|
Additional arguments passed to CDAElement |
{}
|
Source code in ccdakit/builders/sections/vital_signs.py
build()
¶
Build Vital Signs Section XML element.
Returns:
| Type | Description |
|---|---|
Element
|
lxml Element for section |