Skip to content

Commit

Permalink
feat(fhir-types): add resourceType element
Browse files Browse the repository at this point in the history
  • Loading branch information
tangdrew committed Oct 25, 2019
1 parent 48a2fa7 commit fee59b8
Show file tree
Hide file tree
Showing 190 changed files with 758 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* Tracks balance, charges, for patient or cost center
*/
export interface Account {
/** The type of resource */
resourceType?: "Account";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -75,6 +77,8 @@ export const Account: t.Type<Account> = t.recursion<Account>("Account", () =>
status: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Account"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/ActivityDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { UsageContext } from "./UsageContext";
* The definition of a specific activity to be taken, independent of any particular patient or context
*/
export interface ActivityDefinition {
/** The type of resource */
resourceType?: "ActivityDefinition";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -211,6 +213,8 @@ export const ActivityDefinition: t.Type<ActivityDefinition> = t.recursion<
status: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("ActivityDefinition"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Period } from "./Period";
* An address expressed using postal conventions (as opposed to GPS or other location definition formats)
*/
export interface Address {
/** The type of resource */
resourceType?: "Address";
/** Unique id for inter-element referencing */
id?: string;
/** Extension of id element */
Expand Down Expand Up @@ -64,6 +66,8 @@ export const Address: t.Type<Address> = t.recursion<Address>("Address", () =>
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("Address"),
/** Unique id for inter-element referencing */
id: primitives.R4.string,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/AdverseEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { Resource } from "./Resource";
* Medical care, research study or other healthcare event causing physical injury
*/
export interface AdverseEvent {
/** The type of resource */
resourceType?: "AdverseEvent";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -100,6 +102,8 @@ export const AdverseEvent: t.Type<AdverseEvent> = t.recursion<AdverseEvent>(
subject: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("AdverseEvent"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Age.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { Extension } from "./Extension";
* A duration of time during which an organism (or a process) has existed
*/
export interface Age {
/** The type of resource */
resourceType?: "Age";
/** Unique id for inter-element referencing */
id?: string;
/** Extension of id element */
Expand Down Expand Up @@ -45,6 +47,8 @@ export const Age: t.Type<Age> = t.recursion<Age>("Age", () =>
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("Age"),
/** Unique id for inter-element referencing */
id: primitives.R4.string,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/AllergyIntolerance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { Resource } from "./Resource";
* Allergy or Intolerance (generally: Risk of adverse reaction to a substance)
*/
export interface AllergyIntolerance {
/** The type of resource */
resourceType?: "AllergyIntolerance";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -108,6 +110,8 @@ export const AllergyIntolerance: t.Type<AllergyIntolerance> = t.recursion<
patient: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("AllergyIntolerance"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Reference } from "./Reference";
* Text node with attribution
*/
export interface Annotation {
/** The type of resource */
resourceType?: "Annotation";
/** Unique id for inter-element referencing */
id?: string;
/** Extension of id element */
Expand Down Expand Up @@ -45,6 +47,8 @@ export const Annotation: t.Type<Annotation> = t.recursion<Annotation>(
text: primitives.R4.markdown
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Annotation"),
/** Unique id for inter-element referencing */
id: primitives.R4.string,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Appointment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)
*/
export interface Appointment {
/** The type of resource */
resourceType?: "Appointment";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -113,6 +115,8 @@ export const Appointment: t.Type<Appointment> = t.recursion<Appointment>(
status: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Appointment"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/AppointmentResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { Resource } from "./Resource";
* A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection
*/
export interface AppointmentResponse {
/** The type of resource */
resourceType?: "AppointmentResponse";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -78,6 +80,8 @@ export const AppointmentResponse: t.Type<AppointmentResponse> = t.recursion<
participantStatus: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("AppointmentResponse"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { Extension } from "./Extension";
* Content in a format defined elsewhere
*/
export interface Attachment {
/** The type of resource */
resourceType?: "Attachment";
/** Unique id for inter-element referencing */
id?: string;
/** Extension of id element */
Expand Down Expand Up @@ -59,6 +61,8 @@ export const Attachment: t.Type<Attachment> = t.recursion<Attachment>(
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("Attachment"),
/** Unique id for inter-element referencing */
id: primitives.R4.string,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/AuditEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* Event record kept for security purposes
*/
export interface AuditEvent {
/** The type of resource */
resourceType?: "AuditEvent";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -79,6 +81,8 @@ export const AuditEvent: t.Type<AuditEvent> = t.recursion<AuditEvent>(
recorded: primitives.R4.instant
}),
t.partial({
/** The type of resource */
resourceType: t.literal("AuditEvent"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/BackboneElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { Extension } from "./Extension";
* Base for elements defined inside a resource
*/
export interface BackboneElement {
/** The type of resource */
resourceType?: "BackboneElement";
/** Unique id for inter-element referencing */
id?: string;
/** Extension of id element */
Expand All @@ -29,6 +31,8 @@ export const BackboneElement: t.Type<BackboneElement> = t.recursion<
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("BackboneElement"),
/** Unique id for inter-element referencing */
id: primitives.R4.string,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { Resource } from "./Resource";
* Resource for non-supported content
*/
export interface Basic {
/** The type of resource */
resourceType?: "Basic";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -62,6 +64,8 @@ export const Basic: t.Type<Basic> = t.recursion<Basic>("Basic", () =>
code: CodeableConcept
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Basic"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Reference } from "./Reference";
* Pure binary content defined by a format other than FHIR
*/
export interface Binary {
/** The type of resource */
resourceType?: "Binary";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -47,6 +49,8 @@ export const Binary: t.Type<Binary> = t.recursion<Binary>("Binary", () =>
contentType: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Binary"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/BiologicallyDerivedProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* A material substance originating from a biological entity
*/
export interface BiologicallyDerivedProduct {
/** The type of resource */
resourceType?: "BiologicallyDerivedProduct";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -70,6 +72,8 @@ export const BiologicallyDerivedProduct: t.Type<
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("BiologicallyDerivedProduct"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/BodyStructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* Specific and identified anatomical structure
*/
export interface BodyStructure {
/** The type of resource */
resourceType?: "BodyStructure";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -73,6 +75,8 @@ export const BodyStructure: t.Type<BodyStructure> = t.recursion<BodyStructure>(
patient: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("BodyStructure"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/Bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { Signature } from "./Signature";
* Contains a collection of resources
*/
export interface Bundle {
/** The type of resource */
resourceType?: "Bundle";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -56,6 +58,8 @@ export const Bundle: t.Type<Bundle> = t.recursion<Bundle>("Bundle", () =>
type: primitives.R4.code
}),
t.partial({
/** The type of resource */
resourceType: t.literal("Bundle"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/CapabilityStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { UsageContext } from "./UsageContext";
* A statement of system capabilities
*/
export interface CapabilityStatement {
/** The type of resource */
resourceType?: "CapabilityStatement";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -140,6 +142,8 @@ export const CapabilityStatement: t.Type<CapabilityStatement> = t.recursion<
format: t.array(primitives.R4.code)
}),
t.partial({
/** The type of resource */
resourceType: t.literal("CapabilityStatement"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/CarePlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { Timing } from "./Timing";
* Healthcare plan for patient or group
*/
export interface CarePlan {
/** The type of resource */
resourceType?: "CarePlan";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -118,6 +120,8 @@ export const CarePlan: t.Type<CarePlan> = t.recursion<CarePlan>(
subject: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("CarePlan"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/CareTeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { Resource } from "./Resource";
* Planned participants in the coordination and delivery of care for a patient or group
*/
export interface CareTeam {
/** The type of resource */
resourceType?: "CareTeam";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -80,6 +82,8 @@ export const CareTeam: t.Type<CareTeam> = t.recursion<CareTeam>(
t.intersection([
t.type({}),
t.partial({
/** The type of resource */
resourceType: t.literal("CareTeam"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/CatalogEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Resource } from "./Resource";
* An entry in a catalog
*/
export interface CatalogEntry {
/** The type of resource */
resourceType?: "CatalogEntry";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -87,6 +89,8 @@ export const CatalogEntry: t.Type<CatalogEntry> = t.recursion<CatalogEntry>(
referencedItem: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("CatalogEntry"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
4 changes: 4 additions & 0 deletions packages/fhir-types/src/R4/ChargeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { Timing } from "./Timing";
* Item containing charge code(s) associated with the provision of healthcare provider products
*/
export interface ChargeItem {
/** The type of resource */
resourceType?: "ChargeItem";
/** Logical id of this artifact */
id?: primitives.R4.id;
/** Extension of id element */
Expand Down Expand Up @@ -131,6 +133,8 @@ export const ChargeItem: t.Type<ChargeItem> = t.recursion<ChargeItem>(
subject: Reference
}),
t.partial({
/** The type of resource */
resourceType: t.literal("ChargeItem"),
/** Logical id of this artifact */
id: primitives.R4.id,
/** Extension of id element */
Expand Down
Loading

0 comments on commit fee59b8

Please sign in to comment.