-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added support for R4 resources and environment setup
BREAKING CHANGE: New resources contain new dependencies. One of these contains graphql which may require you to delete and reinstall node modules. We have updated several versions so when updating, you should rerun yarn install and may need to remove node_modules before hand.
- Loading branch information
Robert Winterbottom
committed
Jan 9, 2019
1 parent
be3b700
commit 686a764
Showing
5,007 changed files
with
417,141 additions
and
151,605 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* WARNING: DO NOT PUT ANY SECRETS IN HERE, THIS IS ONLY INTENDED TO SETUP | ||
* SIMPLE FEATURE FLAGS. SECRETS SHOULD BE PART OF YOUR DEPLOYMENT STRATEGY | ||
*/ | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
process.env.SOF_AUTHENTICATION = true; | ||
process.env.HAS_GRAPHIQL = true; | ||
} | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
process.env.SOF_AUTHENTICATION = true; | ||
process.env.HAS_GRAPHIQL = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,154 @@ | ||
const CodeScalar = require('../scalars/code.scalar'); | ||
const { | ||
GraphQLInputObjectType, | ||
GraphQLEnumType, | ||
GraphQLNonNull, | ||
GraphQLString, | ||
GraphQLEnumType, | ||
GraphQLList, | ||
GraphQLString, | ||
GraphQLInputObjectType, | ||
} = require('graphql'); | ||
|
||
// Util for extending gql objects | ||
const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); | ||
|
||
let AccountResourceInputType = new GraphQLEnumType({ | ||
name: 'AccountResourceInputType', | ||
values: { | ||
Account: { value: 'Account' }, | ||
}, | ||
}); | ||
const IdScalar = require('../scalars/id.scalar.js'); | ||
const UriScalar = require('../scalars/uri.scalar.js'); | ||
const CodeScalar = require('../scalars/code.scalar.js'); | ||
|
||
/** | ||
* @name exports | ||
* @summary Account Input Schema | ||
*/ | ||
module.exports = new GraphQLInputObjectType({ | ||
name: 'Account_Input', | ||
description: 'Base StructureDefinition for Account Resource.', | ||
fields: () => | ||
extendSchema(require('./domainresource.input'), { | ||
resourceType: { | ||
type: new GraphQLNonNull(AccountResourceInputType), | ||
description: 'Type of this resource.', | ||
}, | ||
identifier: { | ||
type: new GraphQLList(require('./identifier.input')), | ||
description: | ||
'Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).', | ||
}, | ||
name: { | ||
type: GraphQLString, | ||
description: | ||
'Name used for the account when displaying it to humans in reports, etc.', | ||
}, | ||
_name: { | ||
type: require('./element.input'), | ||
description: | ||
'Name used for the account when displaying it to humans in reports, etc.', | ||
}, | ||
type: { | ||
type: require('./codeableconcept.input'), | ||
description: | ||
'Categorizes the account for reporting and searching purposes.', | ||
}, | ||
// ValueSetReference: http://hl7.org/fhir/ValueSet/account-status | ||
status: { | ||
type: CodeScalar, | ||
description: | ||
'Indicates whether the account is presently used/useable or not.', | ||
}, | ||
_status: { | ||
type: require('./element.input'), | ||
description: | ||
'Indicates whether the account is presently used/useable or not.', | ||
}, | ||
activePeriod: { | ||
type: require('./period.input'), | ||
description: | ||
'Indicates the period of time over which the account is allowed.', | ||
}, | ||
currency: { | ||
type: require('./coding.input'), | ||
description: | ||
'Identifies the currency to which transactions must be converted when crediting or debiting the account.', | ||
}, | ||
balance: { | ||
type: require('./quantity.input'), | ||
description: | ||
'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', | ||
}, | ||
coveragePeriod: { | ||
type: require('./period.input'), | ||
description: | ||
'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', | ||
}, | ||
subject: { | ||
type: require('./reference.input'), | ||
description: | ||
'Identifies the patient, device, practitioner, location or other object the account is associated with.', | ||
}, | ||
owner: { | ||
type: require('./reference.input'), | ||
description: | ||
'Indicates the organization, department, etc. with responsibility for the account.', | ||
}, | ||
description: { | ||
type: GraphQLString, | ||
description: | ||
'Provides additional information about what the account tracks and how it is used.', | ||
}, | ||
_description: { | ||
type: require('./element.input'), | ||
description: | ||
'Provides additional information about what the account tracks and how it is used.', | ||
}, | ||
}), | ||
description: 'Base StructureDefinition for Account Resource', | ||
fields: () => ({ | ||
resourceType: { | ||
type: new GraphQLNonNull( | ||
new GraphQLEnumType({ | ||
name: 'Account_Enum_input', | ||
values: { Account: { value: 'Account' } }, | ||
}), | ||
), | ||
description: 'Type of resource', | ||
}, | ||
_id: { | ||
type: require('./element.input.js'), | ||
description: | ||
'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', | ||
}, | ||
id: { | ||
type: IdScalar, | ||
description: | ||
'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', | ||
}, | ||
meta: { | ||
type: require('./meta.input.js'), | ||
description: | ||
'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.', | ||
}, | ||
_implicitRules: { | ||
type: require('./element.input.js'), | ||
description: | ||
'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.', | ||
}, | ||
implicitRules: { | ||
type: UriScalar, | ||
description: | ||
'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.', | ||
}, | ||
_language: { | ||
type: require('./element.input.js'), | ||
description: 'The base language in which the resource is written.', | ||
}, | ||
language: { | ||
type: CodeScalar, | ||
description: 'The base language in which the resource is written.', | ||
}, | ||
text: { | ||
type: require('./narrative.input.js'), | ||
description: | ||
"A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", | ||
}, | ||
contained: { | ||
type: new GraphQLList(GraphQLString), | ||
description: | ||
'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.', | ||
}, | ||
extension: { | ||
type: new GraphQLList(require('./extension.input.js')), | ||
description: | ||
'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.', | ||
}, | ||
modifierExtension: { | ||
type: new GraphQLList(require('./extension.input.js')), | ||
description: | ||
'May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. 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. Applications processing a resource are required to check for modifier extensions.', | ||
}, | ||
identifier: { | ||
type: new GraphQLList(require('./identifier.input.js')), | ||
description: | ||
'Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).', | ||
}, | ||
_name: { | ||
type: require('./element.input.js'), | ||
description: | ||
'Name used for the account when displaying it to humans in reports, etc.', | ||
}, | ||
name: { | ||
type: GraphQLString, | ||
description: | ||
'Name used for the account when displaying it to humans in reports, etc.', | ||
}, | ||
type: { | ||
type: require('./codeableconcept.input.js'), | ||
description: | ||
'Categorizes the account for reporting and searching purposes.', | ||
}, | ||
_status: { | ||
type: require('./element.input.js'), | ||
description: | ||
'Indicates whether the account is presently used/useable or not.', | ||
}, | ||
// valueSetReference: http://hl7.org/fhir/ValueSet/account-status | ||
status: { | ||
type: CodeScalar, | ||
description: | ||
'Indicates whether the account is presently used/useable or not.', | ||
}, | ||
activePeriod: { | ||
type: require('./period.input.js'), | ||
description: | ||
'Indicates the period of time over which the account is allowed.', | ||
}, | ||
currency: { | ||
type: require('./coding.input.js'), | ||
description: | ||
'Identifies the currency to which transactions must be converted when crediting or debiting the account.', | ||
}, | ||
balance: { | ||
type: require('./quantity.input.js'), | ||
description: | ||
'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', | ||
}, | ||
coveragePeriod: { | ||
type: require('./period.input.js'), | ||
description: | ||
'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', | ||
}, | ||
subject: { | ||
type: GraphQLString, | ||
description: | ||
'Identifies the patient, device, practitioner, location or other object the account is associated with.', | ||
}, | ||
owner: { | ||
type: GraphQLString, | ||
description: | ||
'Indicates the organization, department, etc. with responsibility for the account.', | ||
}, | ||
_description: { | ||
type: require('./element.input.js'), | ||
description: | ||
'Provides additional information about what the account tracks and how it is used.', | ||
}, | ||
description: { | ||
type: GraphQLString, | ||
description: | ||
'Provides additional information about what the account tracks and how it is used.', | ||
}, | ||
}), | ||
}); |
Oops, something went wrong.