
001package org.hl7.fhir.convertors.conv30_40; 002 003import org.hl7.fhir.convertors.VersionConvertor_30_40; 004import org.hl7.fhir.dstu3.model.ContactDetail; 005import org.hl7.fhir.dstu3.model.Contributor.ContributorType; 006import org.hl7.fhir.exceptions.FHIRException; 007 008public class PlanDefinition30_40 { 009 010 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior> convertActionCardinalityBehavior(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior> src) throws FHIRException { 011 if (src == null || src.isEmpty()) 012 return null; 013 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehaviorEnumFactory()); 014 VersionConvertor_30_40.copyElement(src, tgt); 015 switch(src.getValue()) { 016 case SINGLE: 017 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.SINGLE); 018 break; 019 case MULTIPLE: 020 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.MULTIPLE); 021 break; 022 default: 023 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior.NULL); 024 break; 025 } 026 return tgt; 027 } 028 029 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior> convertActionCardinalityBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionCardinalityBehavior> src) throws FHIRException { 030 if (src == null || src.isEmpty()) 031 return null; 032 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehaviorEnumFactory()); 033 VersionConvertor_30_40.copyElement(src, tgt); 034 switch(src.getValue()) { 035 case SINGLE: 036 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.SINGLE); 037 break; 038 case MULTIPLE: 039 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.MULTIPLE); 040 break; 041 default: 042 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionCardinalityBehavior.NULL); 043 break; 044 } 045 return tgt; 046 } 047 048 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind> convertActionConditionKind(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind> src) throws FHIRException { 049 if (src == null || src.isEmpty()) 050 return null; 051 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKindEnumFactory()); 052 VersionConvertor_30_40.copyElement(src, tgt); 053 switch(src.getValue()) { 054 case APPLICABILITY: 055 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.APPLICABILITY); 056 break; 057 case START: 058 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.START); 059 break; 060 case STOP: 061 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.STOP); 062 break; 063 default: 064 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind.NULL); 065 break; 066 } 067 return tgt; 068 } 069 070 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind> convertActionConditionKind(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionConditionKind> src) throws FHIRException { 071 if (src == null || src.isEmpty()) 072 return null; 073 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKindEnumFactory()); 074 VersionConvertor_30_40.copyElement(src, tgt); 075 switch(src.getValue()) { 076 case APPLICABILITY: 077 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.APPLICABILITY); 078 break; 079 case START: 080 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.START); 081 break; 082 case STOP: 083 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.STOP); 084 break; 085 default: 086 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionConditionKind.NULL); 087 break; 088 } 089 return tgt; 090 } 091 092 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior> convertActionGroupingBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior> src) throws FHIRException { 093 if (src == null || src.isEmpty()) 094 return null; 095 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehaviorEnumFactory()); 096 VersionConvertor_30_40.copyElement(src, tgt); 097 switch(src.getValue()) { 098 case VISUALGROUP: 099 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.VISUALGROUP); 100 break; 101 case LOGICALGROUP: 102 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.LOGICALGROUP); 103 break; 104 case SENTENCEGROUP: 105 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.SENTENCEGROUP); 106 break; 107 default: 108 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior.NULL); 109 break; 110 } 111 return tgt; 112 } 113 114 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior> convertActionGroupingBehavior(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionGroupingBehavior> src) throws FHIRException { 115 if (src == null || src.isEmpty()) 116 return null; 117 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehaviorEnumFactory()); 118 VersionConvertor_30_40.copyElement(src, tgt); 119 switch(src.getValue()) { 120 case VISUALGROUP: 121 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.VISUALGROUP); 122 break; 123 case LOGICALGROUP: 124 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.LOGICALGROUP); 125 break; 126 case SENTENCEGROUP: 127 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.SENTENCEGROUP); 128 break; 129 default: 130 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionGroupingBehavior.NULL); 131 break; 132 } 133 return tgt; 134 } 135 136 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType> convertActionParticipantType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType> src) throws FHIRException { 137 if (src == null || src.isEmpty()) 138 return null; 139 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantTypeEnumFactory()); 140 VersionConvertor_30_40.copyElement(src, tgt); 141 switch(src.getValue()) { 142 case PATIENT: 143 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.PATIENT); 144 break; 145 case PRACTITIONER: 146 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.PRACTITIONER); 147 break; 148 case RELATEDPERSON: 149 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.RELATEDPERSON); 150 break; 151 default: 152 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType.NULL); 153 break; 154 } 155 return tgt; 156 } 157 158 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType> convertActionParticipantType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionParticipantType> src) throws FHIRException { 159 if (src == null || src.isEmpty()) 160 return null; 161 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantTypeEnumFactory()); 162 VersionConvertor_30_40.copyElement(src, tgt); 163 switch(src.getValue()) { 164 case PATIENT: 165 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.PATIENT); 166 break; 167 case PRACTITIONER: 168 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.PRACTITIONER); 169 break; 170 case RELATEDPERSON: 171 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.RELATEDPERSON); 172 break; 173 default: 174 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionParticipantType.NULL); 175 break; 176 } 177 return tgt; 178 } 179 180 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior> convertActionPrecheckBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior> src) throws FHIRException { 181 if (src == null || src.isEmpty()) 182 return null; 183 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehaviorEnumFactory()); 184 VersionConvertor_30_40.copyElement(src, tgt); 185 switch(src.getValue()) { 186 case YES: 187 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.YES); 188 break; 189 case NO: 190 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.NO); 191 break; 192 default: 193 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior.NULL); 194 break; 195 } 196 return tgt; 197 } 198 199 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior> convertActionPrecheckBehavior(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionPrecheckBehavior> src) throws FHIRException { 200 if (src == null || src.isEmpty()) 201 return null; 202 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehaviorEnumFactory()); 203 VersionConvertor_30_40.copyElement(src, tgt); 204 switch(src.getValue()) { 205 case YES: 206 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.YES); 207 break; 208 case NO: 209 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.NO); 210 break; 211 default: 212 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionPrecheckBehavior.NULL); 213 break; 214 } 215 return tgt; 216 } 217 218 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType> convertActionRelationshipType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType> src) throws FHIRException { 219 if (src == null || src.isEmpty()) 220 return null; 221 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipTypeEnumFactory()); 222 VersionConvertor_30_40.copyElement(src, tgt); 223 switch(src.getValue()) { 224 case BEFORESTART: 225 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFORESTART); 226 break; 227 case BEFORE: 228 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFORE); 229 break; 230 case BEFOREEND: 231 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.BEFOREEND); 232 break; 233 case CONCURRENTWITHSTART: 234 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHSTART); 235 break; 236 case CONCURRENT: 237 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENT); 238 break; 239 case CONCURRENTWITHEND: 240 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHEND); 241 break; 242 case AFTERSTART: 243 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTERSTART); 244 break; 245 case AFTER: 246 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTER); 247 break; 248 case AFTEREND: 249 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.AFTEREND); 250 break; 251 default: 252 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType.NULL); 253 break; 254 } 255 return tgt; 256 } 257 258 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType> convertActionRelationshipType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRelationshipType> src) throws FHIRException { 259 if (src == null || src.isEmpty()) 260 return null; 261 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipTypeEnumFactory()); 262 VersionConvertor_30_40.copyElement(src, tgt); 263 switch(src.getValue()) { 264 case BEFORESTART: 265 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFORESTART); 266 break; 267 case BEFORE: 268 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFORE); 269 break; 270 case BEFOREEND: 271 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.BEFOREEND); 272 break; 273 case CONCURRENTWITHSTART: 274 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHSTART); 275 break; 276 case CONCURRENT: 277 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENT); 278 break; 279 case CONCURRENTWITHEND: 280 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.CONCURRENTWITHEND); 281 break; 282 case AFTERSTART: 283 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTERSTART); 284 break; 285 case AFTER: 286 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTER); 287 break; 288 case AFTEREND: 289 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.AFTEREND); 290 break; 291 default: 292 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRelationshipType.NULL); 293 break; 294 } 295 return tgt; 296 } 297 298 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior> convertActionRequiredBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior> src) throws FHIRException { 299 if (src == null || src.isEmpty()) 300 return null; 301 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehaviorEnumFactory()); 302 VersionConvertor_30_40.copyElement(src, tgt); 303 switch(src.getValue()) { 304 case MUST: 305 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.MUST); 306 break; 307 case COULD: 308 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.COULD); 309 break; 310 case MUSTUNLESSDOCUMENTED: 311 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED); 312 break; 313 default: 314 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior.NULL); 315 break; 316 } 317 return tgt; 318 } 319 320 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior> convertActionRequiredBehavior(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionRequiredBehavior> src) throws FHIRException { 321 if (src == null || src.isEmpty()) 322 return null; 323 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehaviorEnumFactory()); 324 VersionConvertor_30_40.copyElement(src, tgt); 325 switch(src.getValue()) { 326 case MUST: 327 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.MUST); 328 break; 329 case COULD: 330 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.COULD); 331 break; 332 case MUSTUNLESSDOCUMENTED: 333 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.MUSTUNLESSDOCUMENTED); 334 break; 335 default: 336 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionRequiredBehavior.NULL); 337 break; 338 } 339 return tgt; 340 } 341 342 static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior> convertActionSelectionBehavior(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior> src) throws FHIRException { 343 if (src == null || src.isEmpty()) 344 return null; 345 org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehaviorEnumFactory()); 346 VersionConvertor_30_40.copyElement(src, tgt); 347 switch(src.getValue()) { 348 case ANY: 349 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ANY); 350 break; 351 case ALL: 352 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ALL); 353 break; 354 case ALLORNONE: 355 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ALLORNONE); 356 break; 357 case EXACTLYONE: 358 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.EXACTLYONE); 359 break; 360 case ATMOSTONE: 361 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ATMOSTONE); 362 break; 363 case ONEORMORE: 364 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.ONEORMORE); 365 break; 366 default: 367 tgt.setValue(org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior.NULL); 368 break; 369 } 370 return tgt; 371 } 372 373 static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior> convertActionSelectionBehavior(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.PlanDefinition.ActionSelectionBehavior> src) throws FHIRException { 374 if (src == null || src.isEmpty()) 375 return null; 376 org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehaviorEnumFactory()); 377 VersionConvertor_30_40.copyElement(src, tgt); 378 switch(src.getValue()) { 379 case ANY: 380 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ANY); 381 break; 382 case ALL: 383 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ALL); 384 break; 385 case ALLORNONE: 386 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ALLORNONE); 387 break; 388 case EXACTLYONE: 389 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.EXACTLYONE); 390 break; 391 case ATMOSTONE: 392 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ATMOSTONE); 393 break; 394 case ONEORMORE: 395 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.ONEORMORE); 396 break; 397 default: 398 tgt.setValue(org.hl7.fhir.dstu3.model.PlanDefinition.ActionSelectionBehavior.NULL); 399 break; 400 } 401 return tgt; 402 } 403 404 public static org.hl7.fhir.r4.model.PlanDefinition convertPlanDefinition(org.hl7.fhir.dstu3.model.PlanDefinition src) throws FHIRException { 405 if (src == null) 406 return null; 407 org.hl7.fhir.r4.model.PlanDefinition tgt = new org.hl7.fhir.r4.model.PlanDefinition(); 408 VersionConvertor_30_40.copyDomainResource(src, tgt); 409 if (src.hasUrl()) 410 tgt.setUrlElement(VersionConvertor_30_40.convertUri(src.getUrlElement())); 411 for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); 412 if (src.hasVersion()) 413 tgt.setVersionElement(VersionConvertor_30_40.convertString(src.getVersionElement())); 414 if (src.hasName()) 415 tgt.setNameElement(VersionConvertor_30_40.convertString(src.getNameElement())); 416 if (src.hasTitle()) 417 tgt.setTitleElement(VersionConvertor_30_40.convertString(src.getTitleElement())); 418 if (src.hasType()) 419 tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); 420 if (src.hasStatus()) 421 tgt.setStatusElement(VersionConvertor_30_40.convertPublicationStatus(src.getStatusElement())); 422 if (src.hasExperimental()) 423 tgt.setExperimentalElement(VersionConvertor_30_40.convertBoolean(src.getExperimentalElement())); 424 if (src.hasDateElement()) 425 tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); 426 if (src.hasPublisher()) 427 tgt.setPublisherElement(VersionConvertor_30_40.convertString(src.getPublisherElement())); 428 if (src.hasDescription()) 429 tgt.setDescriptionElement(VersionConvertor_30_40.convertMarkdown(src.getDescriptionElement())); 430 if (src.hasPurpose()) 431 tgt.setPurposeElement(VersionConvertor_30_40.convertMarkdown(src.getPurposeElement())); 432 if (src.hasUsage()) 433 tgt.setUsageElement(VersionConvertor_30_40.convertString(src.getUsageElement())); 434 if (src.hasApprovalDate()) 435 tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); 436 if (src.hasLastReviewDate()) 437 tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); 438 if (src.hasEffectivePeriod()) 439 tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); 440 for (org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); 441 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); 442 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getTopic()) tgt.addTopic(VersionConvertor_30_40.convertCodeableConcept(t)); 443 for (org.hl7.fhir.dstu3.model.Contributor t : src.getContributor()) { 444 if (t.getType() == ContributorType.AUTHOR) 445 for (ContactDetail c : t.getContact()) tgt.addAuthor(VersionConvertor_30_40.convertContactDetail(c)); 446 if (t.getType() == ContributorType.EDITOR) 447 for (ContactDetail c : t.getContact()) tgt.addEditor(VersionConvertor_30_40.convertContactDetail(c)); 448 if (t.getType() == ContributorType.REVIEWER) 449 for (ContactDetail c : t.getContact()) tgt.addReviewer(VersionConvertor_30_40.convertContactDetail(c)); 450 if (t.getType() == ContributorType.ENDORSER) 451 for (ContactDetail c : t.getContact()) tgt.addEndorser(VersionConvertor_30_40.convertContactDetail(c)); 452 } 453 for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); 454 if (src.hasCopyright()) 455 tgt.setCopyrightElement(VersionConvertor_30_40.convertMarkdown(src.getCopyrightElement())); 456 for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); 457 for (org.hl7.fhir.dstu3.model.Reference t : src.getLibrary()) tgt.getLibrary().add(VersionConvertor_30_40.convertReferenceToCanonical(t)); 458 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent t : src.getGoal()) tgt.addGoal(convertPlanDefinitionGoalComponent(t)); 459 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) tgt.addAction(convertPlanDefinitionActionComponent(t)); 460 return tgt; 461 } 462 463 public static org.hl7.fhir.dstu3.model.PlanDefinition convertPlanDefinition(org.hl7.fhir.r4.model.PlanDefinition src) throws FHIRException { 464 if (src == null) 465 return null; 466 org.hl7.fhir.dstu3.model.PlanDefinition tgt = new org.hl7.fhir.dstu3.model.PlanDefinition(); 467 VersionConvertor_30_40.copyDomainResource(src, tgt); 468 if (src.hasUrl()) 469 tgt.setUrlElement(VersionConvertor_30_40.convertUri(src.getUrlElement())); 470 for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_30_40.convertIdentifier(t)); 471 if (src.hasVersion()) 472 tgt.setVersionElement(VersionConvertor_30_40.convertString(src.getVersionElement())); 473 if (src.hasName()) 474 tgt.setNameElement(VersionConvertor_30_40.convertString(src.getNameElement())); 475 if (src.hasTitle()) 476 tgt.setTitleElement(VersionConvertor_30_40.convertString(src.getTitleElement())); 477 if (src.hasType()) 478 tgt.setType(VersionConvertor_30_40.convertCodeableConcept(src.getType())); 479 if (src.hasStatus()) 480 tgt.setStatusElement(VersionConvertor_30_40.convertPublicationStatus(src.getStatusElement())); 481 if (src.hasExperimental()) 482 tgt.setExperimentalElement(VersionConvertor_30_40.convertBoolean(src.getExperimentalElement())); 483 if (src.hasDateElement()) 484 tgt.setDateElement(VersionConvertor_30_40.convertDateTime(src.getDateElement())); 485 if (src.hasPublisher()) 486 tgt.setPublisherElement(VersionConvertor_30_40.convertString(src.getPublisherElement())); 487 if (src.hasDescription()) 488 tgt.setDescriptionElement(VersionConvertor_30_40.convertMarkdown(src.getDescriptionElement())); 489 if (src.hasPurpose()) 490 tgt.setPurposeElement(VersionConvertor_30_40.convertMarkdown(src.getPurposeElement())); 491 if (src.hasUsage()) 492 tgt.setUsageElement(VersionConvertor_30_40.convertString(src.getUsageElement())); 493 if (src.hasApprovalDate()) 494 tgt.setApprovalDateElement(VersionConvertor_30_40.convertDate(src.getApprovalDateElement())); 495 if (src.hasLastReviewDate()) 496 tgt.setLastReviewDateElement(VersionConvertor_30_40.convertDate(src.getLastReviewDateElement())); 497 if (src.hasEffectivePeriod()) 498 tgt.setEffectivePeriod(VersionConvertor_30_40.convertPeriod(src.getEffectivePeriod())); 499 for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) tgt.addUseContext(VersionConvertor_30_40.convertUsageContext(t)); 500 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addJurisdiction(VersionConvertor_30_40.convertCodeableConcept(t)); 501 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getTopic()) tgt.addTopic(VersionConvertor_30_40.convertCodeableConcept(t)); 502 for (org.hl7.fhir.r4.model.ContactDetail t : src.getAuthor()) { 503 org.hl7.fhir.dstu3.model.Contributor c = new org.hl7.fhir.dstu3.model.Contributor(); 504 c.setType(ContributorType.AUTHOR); 505 c.addContact(VersionConvertor_30_40.convertContactDetail(t)); 506 tgt.addContributor(c); 507 } 508 for (org.hl7.fhir.r4.model.ContactDetail t : src.getEditor()) { 509 org.hl7.fhir.dstu3.model.Contributor c = new org.hl7.fhir.dstu3.model.Contributor(); 510 c.setType(ContributorType.EDITOR); 511 c.addContact(VersionConvertor_30_40.convertContactDetail(t)); 512 tgt.addContributor(c); 513 } 514 for (org.hl7.fhir.r4.model.ContactDetail t : src.getReviewer()) { 515 org.hl7.fhir.dstu3.model.Contributor c = new org.hl7.fhir.dstu3.model.Contributor(); 516 c.setType(ContributorType.REVIEWER); 517 c.addContact(VersionConvertor_30_40.convertContactDetail(t)); 518 tgt.addContributor(c); 519 } 520 for (org.hl7.fhir.r4.model.ContactDetail t : src.getEndorser()) { 521 org.hl7.fhir.dstu3.model.Contributor c = new org.hl7.fhir.dstu3.model.Contributor(); 522 c.setType(ContributorType.ENDORSER); 523 c.addContact(VersionConvertor_30_40.convertContactDetail(t)); 524 tgt.addContributor(c); 525 } 526 for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(VersionConvertor_30_40.convertContactDetail(t)); 527 if (src.hasCopyright()) 528 tgt.setCopyrightElement(VersionConvertor_30_40.convertMarkdown(src.getCopyrightElement())); 529 for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getRelatedArtifact()) tgt.addRelatedArtifact(VersionConvertor_30_40.convertRelatedArtifact(t)); 530 for (org.hl7.fhir.r4.model.CanonicalType t : src.getLibrary()) tgt.addLibrary(VersionConvertor_30_40.convertCanonicalToReference(t)); 531 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent t : src.getGoal()) tgt.addGoal(convertPlanDefinitionGoalComponent(t)); 532 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) tgt.addAction(convertPlanDefinitionActionComponent(t)); 533 return tgt; 534 } 535 536 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent convertPlanDefinitionActionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent src) throws FHIRException { 537 if (src == null) 538 return null; 539 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent(); 540 VersionConvertor_30_40.copyElement(src, tgt); 541 if (src.hasLabel()) 542 tgt.setPrefixElement(VersionConvertor_30_40.convertString(src.getLabelElement())); 543 if (src.hasTitle()) 544 tgt.setTitleElement(VersionConvertor_30_40.convertString(src.getTitleElement())); 545 if (src.hasDescription()) 546 tgt.setDescriptionElement(VersionConvertor_30_40.convertString(src.getDescriptionElement())); 547 if (src.hasTextEquivalent()) 548 tgt.setTextEquivalentElement(VersionConvertor_30_40.convertString(src.getTextEquivalentElement())); 549 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCodeableConcept(t)); 550 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_30_40.convertCodeableConcept(t)); 551 for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(VersionConvertor_30_40.convertRelatedArtifact(t)); 552 for (org.hl7.fhir.dstu3.model.IdType t : src.getGoalId()) tgt.addGoalId(t.getValue()); 553 for (org.hl7.fhir.dstu3.model.TriggerDefinition t : src.getTriggerDefinition()) tgt.addTrigger(VersionConvertor_30_40.convertTriggerDefinition(t)); 554 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent t : src.getCondition()) tgt.addCondition(convertPlanDefinitionActionConditionComponent(t)); 555 for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getInput()) tgt.addInput(VersionConvertor_30_40.convertDataRequirement(t)); 556 for (org.hl7.fhir.dstu3.model.DataRequirement t : src.getOutput()) tgt.addOutput(VersionConvertor_30_40.convertDataRequirement(t)); 557 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent t : src.getRelatedAction()) tgt.addRelatedAction(convertPlanDefinitionActionRelatedActionComponent(t)); 558 if (src.hasTiming()) 559 tgt.setTiming(VersionConvertor_30_40.convertType(src.getTiming())); 560 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertPlanDefinitionActionParticipantComponent(t)); 561 if (src.hasType()) 562 tgt.getType().addCoding(VersionConvertor_30_40.convertCoding(src.getType())); 563 if (src.hasGroupingBehavior()) 564 tgt.setGroupingBehaviorElement(convertActionGroupingBehavior(src.getGroupingBehaviorElement())); 565 if (src.hasSelectionBehavior()) 566 tgt.setSelectionBehaviorElement(convertActionSelectionBehavior(src.getSelectionBehaviorElement())); 567 if (src.hasRequiredBehavior()) 568 tgt.setRequiredBehaviorElement(convertActionRequiredBehavior(src.getRequiredBehaviorElement())); 569 if (src.hasPrecheckBehavior()) 570 tgt.setPrecheckBehaviorElement(convertActionPrecheckBehavior(src.getPrecheckBehaviorElement())); 571 if (src.hasCardinalityBehavior()) 572 tgt.setCardinalityBehaviorElement(convertActionCardinalityBehavior(src.getCardinalityBehaviorElement())); 573 if (src.hasDefinition()) 574 tgt.setDefinition(VersionConvertor_30_40.convertReferenceToCanonical(src.getDefinition())); 575 if (src.hasTransform()) 576 tgt.setTransformElement(VersionConvertor_30_40.convertReferenceToCanonical(src.getTransform())); 577 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent t : src.getDynamicValue()) tgt.addDynamicValue(convertPlanDefinitionActionDynamicValueComponent(t)); 578 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) tgt.addAction(convertPlanDefinitionActionComponent(t)); 579 return tgt; 580 } 581 582 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent convertPlanDefinitionActionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent src) throws FHIRException { 583 if (src == null) 584 return null; 585 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionComponent(); 586 VersionConvertor_30_40.copyElement(src, tgt); 587 if (src.hasPrefix()) 588 tgt.setLabelElement(VersionConvertor_30_40.convertString(src.getPrefixElement())); 589 if (src.hasTitle()) 590 tgt.setTitleElement(VersionConvertor_30_40.convertString(src.getTitleElement())); 591 if (src.hasDescription()) 592 tgt.setDescriptionElement(VersionConvertor_30_40.convertString(src.getDescriptionElement())); 593 if (src.hasTextEquivalent()) 594 tgt.setTextEquivalentElement(VersionConvertor_30_40.convertString(src.getTextEquivalentElement())); 595 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) tgt.addCode(VersionConvertor_30_40.convertCodeableConcept(t)); 596 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReason()) tgt.addReason(VersionConvertor_30_40.convertCodeableConcept(t)); 597 for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(VersionConvertor_30_40.convertRelatedArtifact(t)); 598 for (org.hl7.fhir.r4.model.IdType t : src.getGoalId()) tgt.addGoalId(t.getValue()); 599 for (org.hl7.fhir.r4.model.TriggerDefinition t : src.getTrigger()) tgt.addTriggerDefinition(VersionConvertor_30_40.convertTriggerDefinition(t)); 600 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent t : src.getCondition()) tgt.addCondition(convertPlanDefinitionActionConditionComponent(t)); 601 for (org.hl7.fhir.r4.model.DataRequirement t : src.getInput()) tgt.addInput(VersionConvertor_30_40.convertDataRequirement(t)); 602 for (org.hl7.fhir.r4.model.DataRequirement t : src.getOutput()) tgt.addOutput(VersionConvertor_30_40.convertDataRequirement(t)); 603 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent t : src.getRelatedAction()) tgt.addRelatedAction(convertPlanDefinitionActionRelatedActionComponent(t)); 604 if (src.hasTiming()) 605 tgt.setTiming(VersionConvertor_30_40.convertType(src.getTiming())); 606 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertPlanDefinitionActionParticipantComponent(t)); 607 if (src.hasType()) 608 tgt.setType(VersionConvertor_30_40.convertCoding(src.getType().getCodingFirstRep())); 609 if (src.hasGroupingBehavior()) 610 tgt.setGroupingBehaviorElement(convertActionGroupingBehavior(src.getGroupingBehaviorElement())); 611 if (src.hasSelectionBehavior()) 612 tgt.setSelectionBehaviorElement(convertActionSelectionBehavior(src.getSelectionBehaviorElement())); 613 if (src.hasRequiredBehavior()) 614 tgt.setRequiredBehaviorElement(convertActionRequiredBehavior(src.getRequiredBehaviorElement())); 615 if (src.hasPrecheckBehavior()) 616 tgt.setPrecheckBehaviorElement(convertActionPrecheckBehavior(src.getPrecheckBehaviorElement())); 617 if (src.hasCardinalityBehavior()) 618 tgt.setCardinalityBehaviorElement(convertActionCardinalityBehavior(src.getCardinalityBehaviorElement())); 619 if (src.hasDefinitionCanonicalType()) 620 tgt.setDefinition(VersionConvertor_30_40.convertCanonicalToReference(src.getDefinitionCanonicalType())); 621 if (src.hasTransform()) 622 tgt.setTransform(VersionConvertor_30_40.convertCanonicalToReference(src.getTransformElement())); 623 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent t : src.getDynamicValue()) tgt.addDynamicValue(convertPlanDefinitionActionDynamicValueComponent(t)); 624 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionComponent t : src.getAction()) tgt.addAction(convertPlanDefinitionActionComponent(t)); 625 return tgt; 626 } 627 628 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent convertPlanDefinitionActionConditionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent src) throws FHIRException { 629 if (src == null) 630 return null; 631 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent(); 632 VersionConvertor_30_40.copyElement(src, tgt); 633 if (src.hasKind()) 634 tgt.setKindElement(convertActionConditionKind(src.getKindElement())); 635 if (src.hasDescription()) 636 tgt.getExpression().setDescription(src.getDescription()); 637 if (src.hasLanguage()) 638 tgt.getExpression().setLanguage(src.getLanguage()); 639 if (src.hasExpression()) 640 tgt.getExpression().setExpression(src.getExpression()); 641 return tgt; 642 } 643 644 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent convertPlanDefinitionActionConditionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent src) throws FHIRException { 645 if (src == null) 646 return null; 647 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionConditionComponent(); 648 VersionConvertor_30_40.copyElement(src, tgt); 649 if (src.hasKind()) 650 tgt.setKindElement(convertActionConditionKind(src.getKindElement())); 651 if (src.getExpression().hasDescription()) 652 tgt.setDescription(src.getExpression().getDescription()); 653 if (src.getExpression().hasLanguage()) 654 tgt.setLanguage(src.getExpression().getLanguage()); 655 if (src.getExpression().hasExpression()) 656 tgt.setExpression(src.getExpression().getExpression()); 657 return tgt; 658 } 659 660 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent convertPlanDefinitionActionDynamicValueComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent src) throws FHIRException { 661 if (src == null) 662 return null; 663 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); 664 VersionConvertor_30_40.copyElement(src, tgt); 665 if (src.hasDescription()) 666 tgt.getExpression().setDescription(src.getDescription()); 667 if (src.hasPath()) 668 tgt.setPathElement(VersionConvertor_30_40.convertString(src.getPathElement())); 669 if (src.hasLanguage()) 670 tgt.getExpression().setLanguage(src.getLanguage()); 671 if (src.hasExpression()) 672 tgt.getExpression().setExpression(src.getExpression()); 673 return tgt; 674 } 675 676 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent convertPlanDefinitionActionDynamicValueComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent src) throws FHIRException { 677 if (src == null) 678 return null; 679 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionDynamicValueComponent(); 680 VersionConvertor_30_40.copyElement(src, tgt); 681 if (src.getExpression().hasDescription()) 682 tgt.setDescription(src.getExpression().getDescription()); 683 if (src.hasPath()) 684 tgt.setPathElement(VersionConvertor_30_40.convertString(src.getPathElement())); 685 if (src.getExpression().hasLanguage()) 686 tgt.setLanguage(src.getExpression().getLanguage()); 687 if (src.getExpression().hasExpression()) 688 tgt.setExpression(src.getExpression().getExpression()); 689 return tgt; 690 } 691 692 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent convertPlanDefinitionActionParticipantComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent src) throws FHIRException { 693 if (src == null) 694 return null; 695 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent(); 696 VersionConvertor_30_40.copyElement(src, tgt); 697 if (src.hasType()) 698 tgt.setTypeElement(convertActionParticipantType(src.getTypeElement())); 699 if (src.hasRole()) 700 tgt.setRole(VersionConvertor_30_40.convertCodeableConcept(src.getRole())); 701 return tgt; 702 } 703 704 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent convertPlanDefinitionActionParticipantComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionParticipantComponent src) throws FHIRException { 705 if (src == null) 706 return null; 707 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionParticipantComponent(); 708 VersionConvertor_30_40.copyElement(src, tgt); 709 if (src.hasType()) 710 tgt.setTypeElement(convertActionParticipantType(src.getTypeElement())); 711 if (src.hasRole()) 712 tgt.setRole(VersionConvertor_30_40.convertCodeableConcept(src.getRole())); 713 return tgt; 714 } 715 716 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent convertPlanDefinitionActionRelatedActionComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent src) throws FHIRException { 717 if (src == null) 718 return null; 719 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); 720 VersionConvertor_30_40.copyElement(src, tgt); 721 if (src.hasActionId()) 722 tgt.setActionIdElement(VersionConvertor_30_40.convertId(src.getActionIdElement())); 723 if (src.hasRelationship()) 724 tgt.setRelationshipElement(convertActionRelationshipType(src.getRelationshipElement())); 725 if (src.hasOffset()) 726 tgt.setOffset(VersionConvertor_30_40.convertType(src.getOffset())); 727 return tgt; 728 } 729 730 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent convertPlanDefinitionActionRelatedActionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent src) throws FHIRException { 731 if (src == null) 732 return null; 733 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionActionRelatedActionComponent(); 734 VersionConvertor_30_40.copyElement(src, tgt); 735 if (src.hasActionId()) 736 tgt.setActionIdElement(VersionConvertor_30_40.convertId(src.getActionIdElement())); 737 if (src.hasRelationship()) 738 tgt.setRelationshipElement(convertActionRelationshipType(src.getRelationshipElement())); 739 if (src.hasOffset()) 740 tgt.setOffset(VersionConvertor_30_40.convertType(src.getOffset())); 741 return tgt; 742 } 743 744 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent convertPlanDefinitionGoalComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent src) throws FHIRException { 745 if (src == null) 746 return null; 747 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent(); 748 VersionConvertor_30_40.copyElement(src, tgt); 749 if (src.hasCategory()) 750 tgt.setCategory(VersionConvertor_30_40.convertCodeableConcept(src.getCategory())); 751 if (src.hasDescription()) 752 tgt.setDescription(VersionConvertor_30_40.convertCodeableConcept(src.getDescription())); 753 if (src.hasPriority()) 754 tgt.setPriority(VersionConvertor_30_40.convertCodeableConcept(src.getPriority())); 755 if (src.hasStart()) 756 tgt.setStart(VersionConvertor_30_40.convertCodeableConcept(src.getStart())); 757 for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getAddresses()) tgt.addAddresses(VersionConvertor_30_40.convertCodeableConcept(t)); 758 for (org.hl7.fhir.dstu3.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(VersionConvertor_30_40.convertRelatedArtifact(t)); 759 for (org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent t : src.getTarget()) tgt.addTarget(convertPlanDefinitionGoalTargetComponent(t)); 760 return tgt; 761 } 762 763 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent convertPlanDefinitionGoalComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalComponent src) throws FHIRException { 764 if (src == null) 765 return null; 766 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalComponent(); 767 VersionConvertor_30_40.copyElement(src, tgt); 768 if (src.hasCategory()) 769 tgt.setCategory(VersionConvertor_30_40.convertCodeableConcept(src.getCategory())); 770 if (src.hasDescription()) 771 tgt.setDescription(VersionConvertor_30_40.convertCodeableConcept(src.getDescription())); 772 if (src.hasPriority()) 773 tgt.setPriority(VersionConvertor_30_40.convertCodeableConcept(src.getPriority())); 774 if (src.hasStart()) 775 tgt.setStart(VersionConvertor_30_40.convertCodeableConcept(src.getStart())); 776 for (org.hl7.fhir.r4.model.CodeableConcept t : src.getAddresses()) tgt.addAddresses(VersionConvertor_30_40.convertCodeableConcept(t)); 777 for (org.hl7.fhir.r4.model.RelatedArtifact t : src.getDocumentation()) tgt.addDocumentation(VersionConvertor_30_40.convertRelatedArtifact(t)); 778 for (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent t : src.getTarget()) tgt.addTarget(convertPlanDefinitionGoalTargetComponent(t)); 779 return tgt; 780 } 781 782 public static org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent convertPlanDefinitionGoalTargetComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent src) throws FHIRException { 783 if (src == null) 784 return null; 785 org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent tgt = new org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent(); 786 VersionConvertor_30_40.copyElement(src, tgt); 787 if (src.hasMeasure()) 788 tgt.setMeasure(VersionConvertor_30_40.convertCodeableConcept(src.getMeasure())); 789 if (src.hasDetail()) 790 tgt.setDetail(VersionConvertor_30_40.convertType(src.getDetail())); 791 if (src.hasDue()) 792 tgt.setDue(VersionConvertor_30_40.convertDuration(src.getDue())); 793 return tgt; 794 } 795 796 public static org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent convertPlanDefinitionGoalTargetComponent(org.hl7.fhir.dstu3.model.PlanDefinition.PlanDefinitionGoalTargetComponent src) throws FHIRException { 797 if (src == null) 798 return null; 799 org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent tgt = new org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionGoalTargetComponent(); 800 VersionConvertor_30_40.copyElement(src, tgt); 801 if (src.hasMeasure()) 802 tgt.setMeasure(VersionConvertor_30_40.convertCodeableConcept(src.getMeasure())); 803 if (src.hasDetail()) 804 tgt.setDetail(VersionConvertor_30_40.convertType(src.getDetail())); 805 if (src.hasDue()) 806 tgt.setDue(VersionConvertor_30_40.convertDuration(src.getDue())); 807 return tgt; 808 } 809}