Skip to content

Commit 54bbf4f

Browse files
committed
feat(codegen): generate CDA ValueSet enums and bind coded properties (Milestone 3)
1 parent e1659ad commit 54bbf4f

54 files changed

Lines changed: 3512 additions & 52 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Component/CdaModels/src/ClinicalClass/AssociatedEntity.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\II;
1010
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IdentifiedBy;
1111
use Ardenexal\FHIRTools\Component\CdaModels\DataType\TEL;
12+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\RoleClassAssociative;
1213
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1314
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1415

@@ -28,8 +29,8 @@ class AssociatedEntity extends InfrastructureRoot
2829
* @param list<TEL> $telecom
2930
*/
3031
public function __construct(
31-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: true, xmlSerializedName: '@classCode')]
32-
public ?string $classCode = null,
32+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: true, xmlSerializedName: '@classCode')]
33+
public ?RoleClassAssociative $classCode = null,
3334
#[FhirProperty(
3435
fhirType: 'http://hl7.org/cda/stds/core/StructureDefinition/II',
3536
propertyKind: 'complex',

src/Component/CdaModels/src/ClinicalClass/Criterion.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\BL;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CD;
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\ED;
10+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClassObservation;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1112
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1213

@@ -19,8 +20,8 @@
1920
class Criterion extends InfrastructureRoot
2021
{
2122
public function __construct(
22-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
23-
public ?string $classCode = null,
23+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
24+
public ?ActClassObservation $classCode = null,
2425
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@moodCode')]
2526
public string $moodCode = 'EVN.CRT',
2627
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/ExternalAct.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CD;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\ED;
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\II;
10+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClass;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1112
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1213

@@ -23,8 +24,8 @@ class ExternalAct extends InfrastructureRoot
2324
* @param list<Author> $sdtcAuthor
2425
*/
2526
public function __construct(
26-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
27-
public ?string $classCode = null,
27+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
28+
public ?ActClass $classCode = null,
2829
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@moodCode')]
2930
public string $moodCode = 'EVN',
3031
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/ExternalObservation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CD;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\ED;
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\II;
10+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClassObservation;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1112
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1213

@@ -23,8 +24,8 @@ class ExternalObservation extends InfrastructureRoot
2324
* @param list<Author> $sdtcAuthor
2425
*/
2526
public function __construct(
26-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
27-
public ?string $classCode = null,
27+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
28+
public ?ActClassObservation $classCode = null,
2829
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@moodCode')]
2930
public string $moodCode = 'EVN',
3031
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/IntendedRecipient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\II;
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IdentifiedBy;
1010
use Ardenexal\FHIRTools\Component\CdaModels\DataType\TEL;
11+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\InformationRecipientRole;
1112
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1213
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1314

@@ -26,8 +27,8 @@ class IntendedRecipient extends InfrastructureRoot
2627
* @param list<TEL> $telecom
2728
*/
2829
public function __construct(
29-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
30-
public ?string $classCode = null,
30+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
31+
public ?InformationRecipientRole $classCode = null,
3132
#[FhirProperty(
3233
fhirType: 'http://hl7.org/cda/stds/core/StructureDefinition/II',
3334
propertyKind: 'complex',

src/Component/CdaModels/src/ClinicalClass/Observation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IVLINT;
1313
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IVLTS;
1414
use Ardenexal\FHIRTools\Component\CdaModels\DataType\ST;
15+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClassObservation;
1516
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1617
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1718

@@ -43,8 +44,8 @@ class Observation extends InfrastructureRoot
4344
* @param list<InFulfillmentOf1> $sdtcInFulfillmentOf1
4445
*/
4546
public function __construct(
46-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: true, xmlSerializedName: '@classCode')]
47-
public ?string $classCode = null,
47+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: true, xmlSerializedName: '@classCode')]
48+
public ?ActClassObservation $classCode = null,
4849
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: true, xmlSerializedName: '@moodCode')]
4950
public ?string $moodCode = null,
5051
#[FhirProperty(fhirType: 'boolean', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@negationInd')]

src/Component/CdaModels/src/ClinicalClass/ObservationRange.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CE;
99
use Ardenexal\FHIRTools\Component\CdaModels\DataType\ED;
1010
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IVLINT;
11+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClassObservation;
1112
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1213
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1314

@@ -23,8 +24,8 @@ class ObservationRange extends InfrastructureRoot
2324
* @param list<InfrastructureRoot> $sdtcPrecondition1
2425
*/
2526
public function __construct(
26-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
27-
public ?string $classCode = null,
27+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
28+
public ?ActClassObservation $classCode = null,
2829
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@moodCode')]
2930
public string $moodCode = 'EVN.CRT',
3031
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/Order.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CE;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\II;
9+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ActClass;
910
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1112

@@ -21,8 +22,8 @@ class Order extends InfrastructureRoot
2122
* @param list<II> $id
2223
*/
2324
public function __construct(
24-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
25-
public ?string $classCode = null,
25+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: false, xmlSerializedName: '@classCode')]
26+
public ?ActClass $classCode = null,
2627
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@moodCode')]
2728
public string $moodCode = 'RQO',
2829
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/Participant1.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CE;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IVLTS;
9+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ParticipationType;
910
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1112

@@ -18,8 +19,8 @@
1819
class Participant1 extends InfrastructureRoot
1920
{
2021
public function __construct(
21-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: true, xmlSerializedName: '@typeCode')]
22-
public ?string $typeCode = null,
22+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: true, xmlSerializedName: '@typeCode')]
23+
public ?ParticipationType $typeCode = null,
2324
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@contextControlCode')]
2425
public string $contextControlCode = 'OP',
2526
#[FhirProperty(

src/Component/CdaModels/src/ClinicalClass/Participant2.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Ardenexal\FHIRTools\Component\CdaModels\DataType\CE;
88
use Ardenexal\FHIRTools\Component\CdaModels\DataType\IVLTS;
9+
use Ardenexal\FHIRTools\Component\CdaModels\Enum\ParticipationType;
910
use Ardenexal\FHIRTools\Component\Metadata\Attribute\FhirProperty;
1011
use Ardenexal\FHIRTools\Component\Metadata\Attribute\LogicalModel;
1112

@@ -18,8 +19,8 @@
1819
class Participant2 extends InfrastructureRoot
1920
{
2021
public function __construct(
21-
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: true, xmlSerializedName: '@typeCode')]
22-
public ?string $typeCode = null,
22+
#[FhirProperty(fhirType: 'code', propertyKind: 'enum', isArray: false, isRequired: true, xmlSerializedName: '@typeCode')]
23+
public ?ParticipationType $typeCode = null,
2324
#[FhirProperty(fhirType: 'code', propertyKind: 'scalar', isArray: false, isRequired: false, xmlSerializedName: '@contextControlCode')]
2425
public string $contextControlCode = 'OP',
2526
#[FhirProperty(

0 commit comments

Comments
 (0)