Skip to content

Commit 4ba2811

Browse files
committed
TS - Added 'FhirResource' type as union of resources.
TS - Changed 'resourceType' to 'string' in abstract models.
1 parent 0079097 commit 4ba2811

5 files changed

Lines changed: 623 additions & 51 deletions

File tree

generated/TypeScript_R2.ts

Lines changed: 103 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,7 +2800,7 @@ export interface BundleEntry extends BackboneElement {
28002800
/**
28012801
* The Resources for the entry.
28022802
*/
2803-
resource?: Resource;
2803+
resource?: FhirResource;
28042804
/**
28052805
* Additional information about how this entry should be processed as part of a transaction.
28062806
*/
@@ -6919,11 +6919,11 @@ export enum DocumentReferenceStatusCodes {
69196919
*/
69206920
export interface DomainResource extends Resource {
69216921
/** Resource Type Name (for serialization) */
6922-
resourceType: any;
6922+
resourceType: string;
69236923
/**
69246924
* These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
69256925
*/
6926-
contained?: Resource[];
6926+
contained?: FhirResource[];
69276927
/**
69286928
* May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
69296929
*/
@@ -11097,7 +11097,7 @@ export interface ParametersParameter extends BackboneElement {
1109711097
/**
1109811098
* If the parameter is a whole resource.
1109911099
*/
11100-
resource?: Resource;
11100+
resource?: FhirResource;
1110111101
/**
1110211102
* If the parameter is a data type.
1110311103
*/
@@ -12831,7 +12831,7 @@ export enum RelatedPersonGenderCodes {
1283112831
*/
1283212832
export interface Resource {
1283312833
/** Resource Type Name (for serialization) */
12834-
resourceType: any;
12834+
resourceType: string;
1283512835
/**
1283612836
* The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
1283712837
*/
@@ -196262,3 +196262,101 @@ export const XdsRelationshipType = {
196262196262
*/
196263196263
XFRMRPLC: xds_relationship_type_XFRMRPLC,
196264196264
};
196265+
/**
196266+
* Resource binding for generic use.
196267+
*/
196268+
export type FhirResource =
196269+
Account
196270+
|AllergyIntolerance
196271+
|Appointment
196272+
|AppointmentResponse
196273+
|AuditEvent
196274+
|Basic
196275+
|Binary
196276+
|BodySite
196277+
|Bundle
196278+
|CarePlan
196279+
|Claim
196280+
|ClaimResponse
196281+
|ClinicalImpression
196282+
|Communication
196283+
|CommunicationRequest
196284+
|Composition
196285+
|ConceptMap
196286+
|Condition
196287+
|Conformance
196288+
|Contract
196289+
|Coverage
196290+
|DataElement
196291+
|DetectedIssue
196292+
|Device
196293+
|DeviceComponent
196294+
|DeviceMetric
196295+
|DeviceUseRequest
196296+
|DeviceUseStatement
196297+
|DiagnosticOrder
196298+
|DiagnosticReport
196299+
|DocumentManifest
196300+
|DocumentReference
196301+
|EligibilityRequest
196302+
|EligibilityResponse
196303+
|Encounter
196304+
|EnrollmentRequest
196305+
|EnrollmentResponse
196306+
|EpisodeOfCare
196307+
|ExplanationOfBenefit
196308+
|FamilyMemberHistory
196309+
|Flag
196310+
|Goal
196311+
|Group
196312+
|HealthcareService
196313+
|ImagingObjectSelection
196314+
|ImagingStudy
196315+
|Immunization
196316+
|ImmunizationRecommendation
196317+
|ImplementationGuide
196318+
|List
196319+
|Location
196320+
|Media
196321+
|Medication
196322+
|MedicationAdministration
196323+
|MedicationDispense
196324+
|MedicationOrder
196325+
|MedicationStatement
196326+
|MessageHeader
196327+
|NamingSystem
196328+
|NutritionOrder
196329+
|Observation
196330+
|OperationDefinition
196331+
|OperationOutcome
196332+
|Order
196333+
|OrderResponse
196334+
|Organization
196335+
|Parameters
196336+
|Patient
196337+
|PaymentNotice
196338+
|PaymentReconciliation
196339+
|Person
196340+
|Practitioner
196341+
|Procedure
196342+
|ProcedureRequest
196343+
|ProcessRequest
196344+
|ProcessResponse
196345+
|Provenance
196346+
|Questionnaire
196347+
|QuestionnaireResponse
196348+
|ReferralRequest
196349+
|RelatedPerson
196350+
|RiskAssessment
196351+
|Schedule
196352+
|SearchParameter
196353+
|Slot
196354+
|Specimen
196355+
|StructureDefinition
196356+
|Subscription
196357+
|Substance
196358+
|SupplyDelivery
196359+
|SupplyRequest
196360+
|TestScript
196361+
|ValueSet
196362+
|VisionPrescription;

generated/TypeScript_R3.ts

Lines changed: 127 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3629,7 +3629,7 @@ export interface BundleEntryResponse extends BackboneElement {
36293629
/**
36303630
* For a POST/PUT operation, this is the equivalent outcome that would be returned for prefer = operationoutcome - except that the resource is always returned whether or not the outcome is returned.
36313631
*/
3632-
outcome?: Resource;
3632+
outcome?: FhirResource;
36333633
/**
36343634
* The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.
36353635
*/
@@ -3656,7 +3656,7 @@ export interface BundleEntry extends BackboneElement {
36563656
/**
36573657
* The Resources for the entry.
36583658
*/
3659-
resource?: Resource;
3659+
resource?: FhirResource;
36603660
/**
36613661
* Additional information about how this entry should be processed as part of a transaction.
36623662
*/
@@ -9134,11 +9134,11 @@ export enum DocumentReferenceStatusCodes {
91349134
*/
91359135
export interface DomainResource extends Resource {
91369136
/** Resource Type Name (for serialization) */
9137-
resourceType: any;
9137+
resourceType: string;
91389138
/**
91399139
* This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.
91409140
*/
9141-
contained?: Resource[];
9141+
contained?: FhirResource[];
91429142
/**
91439143
* There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
91449144
*/
@@ -15697,7 +15697,7 @@ export interface ParametersParameter extends BackboneElement {
1569715697
/**
1569815698
* If the parameter is a whole resource.
1569915699
*/
15700-
resource?: Resource;
15700+
resource?: FhirResource;
1570115701
/**
1570215702
* If the parameter is a data type.
1570315703
*/
@@ -18944,7 +18944,7 @@ export enum ResearchSubjectStatusCodes {
1894418944
*/
1894518945
export interface Resource {
1894618946
/** Resource Type Name (for serialization) */
18947-
resourceType: any;
18947+
resourceType: string;
1894818948
/**
1894918949
* The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
1895018950
*/
@@ -244301,3 +244301,124 @@ export const VisionProduct = {
244301244301
*/
244302244302
Lens: vision_product_Lens,
244303244303
};
244304+
/**
244305+
* Resource binding for generic use.
244306+
*/
244307+
export type FhirResource =
244308+
Account
244309+
|ActivityDefinition
244310+
|AdverseEvent
244311+
|AllergyIntolerance
244312+
|Appointment
244313+
|AppointmentResponse
244314+
|AuditEvent
244315+
|Basic
244316+
|Binary
244317+
|BodySite
244318+
|Bundle
244319+
|CapabilityStatement
244320+
|CarePlan
244321+
|CareTeam
244322+
|ChargeItem
244323+
|Claim
244324+
|ClaimResponse
244325+
|ClinicalImpression
244326+
|CodeSystem
244327+
|Communication
244328+
|CommunicationRequest
244329+
|CompartmentDefinition
244330+
|Composition
244331+
|ConceptMap
244332+
|Condition
244333+
|Consent
244334+
|Contract
244335+
|Coverage
244336+
|DataElement
244337+
|DetectedIssue
244338+
|Device
244339+
|DeviceComponent
244340+
|DeviceMetric
244341+
|DeviceRequest
244342+
|DeviceUseStatement
244343+
|DiagnosticReport
244344+
|DocumentManifest
244345+
|DocumentReference
244346+
|EligibilityRequest
244347+
|EligibilityResponse
244348+
|Encounter
244349+
|Endpoint
244350+
|EnrollmentRequest
244351+
|EnrollmentResponse
244352+
|EpisodeOfCare
244353+
|ExpansionProfile
244354+
|ExplanationOfBenefit
244355+
|FamilyMemberHistory
244356+
|Flag
244357+
|Goal
244358+
|GraphDefinition
244359+
|Group
244360+
|GuidanceResponse
244361+
|HealthcareService
244362+
|ImagingManifest
244363+
|ImagingStudy
244364+
|Immunization
244365+
|ImmunizationRecommendation
244366+
|ImplementationGuide
244367+
|Library
244368+
|Linkage
244369+
|List
244370+
|Location
244371+
|Measure
244372+
|MeasureReport
244373+
|Media
244374+
|Medication
244375+
|MedicationAdministration
244376+
|MedicationDispense
244377+
|MedicationRequest
244378+
|MedicationStatement
244379+
|MessageDefinition
244380+
|MessageHeader
244381+
|NamingSystem
244382+
|NutritionOrder
244383+
|Observation
244384+
|OperationDefinition
244385+
|OperationOutcome
244386+
|Organization
244387+
|Parameters
244388+
|Patient
244389+
|PaymentNotice
244390+
|PaymentReconciliation
244391+
|Person
244392+
|PlanDefinition
244393+
|Practitioner
244394+
|PractitionerRole
244395+
|Procedure
244396+
|ProcedureRequest
244397+
|ProcessRequest
244398+
|ProcessResponse
244399+
|Provenance
244400+
|Questionnaire
244401+
|QuestionnaireResponse
244402+
|ReferralRequest
244403+
|RelatedPerson
244404+
|RequestGroup
244405+
|ResearchStudy
244406+
|ResearchSubject
244407+
|RiskAssessment
244408+
|Schedule
244409+
|SearchParameter
244410+
|Sequence
244411+
|ServiceDefinition
244412+
|Slot
244413+
|Specimen
244414+
|StructureDefinition
244415+
|StructureMap
244416+
|Subscription
244417+
|Substance
244418+
|SupplyDelivery
244419+
|SupplyRequest
244420+
|Task
244421+
|TestReport
244422+
|TestScript
244423+
|ValueSet
244424+
|VisionPrescription;

0 commit comments

Comments
 (0)